Documentation: fix warning "unbalanced square brackets"
[openocd.git] / src / server / gdb_server.c
index dfd7cd52010e3991320000514c4a52b29129c8c5..5052bf43b2312036be903f79a505a483f2ff4cf6 100644 (file)
@@ -128,9 +128,9 @@ static int gdb_actual_connections;
 /* set if we are sending a memory map to gdb
  * via qXfer:memory-map:read packet */
 /* enabled by default*/
-static int gdb_use_memory_map = 1;
+static bool gdb_use_memory_map = true;
 /* enabled by default*/
-static int gdb_flash_program = 1;
+static bool gdb_flash_program = true;
 
 /* if set, data aborts cause an error to be reported in memory read packets
  * see the code in gdb_read_memory_packet() for further explanations.
@@ -144,7 +144,7 @@ static int gdb_report_register_access_error;
 /* set if we are sending target descriptions to gdb
  * via qXfer:features:read packet */
 /* enabled by default */
-static int gdb_use_target_description = 1;
+static bool gdb_use_target_description = true;
 
 /* current processing free-run type, used by file-I/O */
 static char gdb_running_type;
@@ -2599,7 +2599,7 @@ static int gdb_get_target_description_chunk(struct target *target, struct target
        return ERROR_OK;
 }
 
-static int gdb_target_description_supported(struct target *target, int *supported)
+static int gdb_target_description_supported(struct target *target, bool *supported)
 {
        int retval = ERROR_OK;
        struct reg **reg_list = NULL;
@@ -2631,9 +2631,9 @@ static int gdb_target_description_supported(struct target *target, int *supporte
 
        if (supported) {
                if (architecture || feature_list_size)
-                       *supported = 1;
+                       *supported = true;
                else
-                       *supported = 0;
+                       *supported = false;
        }
 
 error:
@@ -2867,20 +2867,20 @@ static int gdb_query_packet(struct connection *connection,
                char *buffer = NULL;
                int pos = 0;
                int size = 0;
-               int gdb_target_desc_supported = 0;
+               bool gdb_target_desc_supported = false;
 
                /* we need to test that the target supports target descriptions */
                retval = gdb_target_description_supported(target, &gdb_target_desc_supported);
                if (retval != ERROR_OK) {
                        LOG_INFO("Failed detecting Target Description Support, disabling");
-                       gdb_target_desc_supported = 0;
+                       gdb_target_desc_supported = false;
                }
 
                /* support may be disabled globally */
-               if (gdb_use_target_description == 0) {
+               if (!gdb_use_target_description) {
                        if (gdb_target_desc_supported)
                                LOG_WARNING("Target Descriptions Supported, but disabled");
-                       gdb_target_desc_supported = 0;
+                       gdb_target_desc_supported = false;
                }
 
                xml_printf(&retval,
@@ -2889,8 +2889,8 @@ static int gdb_query_packet(struct connection *connection,
                        &size,
                        "PacketSize=%x;qXfer:memory-map:read%c;qXfer:features:read%c;qXfer:threads:read+;QStartNoAckMode+;vContSupported+",
                        GDB_BUFFER_SIZE,
-                       ((gdb_use_memory_map == 1) && (flash_get_bank_count() > 0)) ? '+' : '-',
-                       (gdb_target_desc_supported == 1) ? '+' : '-');
+                       (gdb_use_memory_map && (flash_get_bank_count() > 0)) ? '+' : '-',
+                       gdb_target_desc_supported ? '+' : '-');
 
                if (retval != ERROR_OK) {
                        gdb_send_error(connection, 01);
@@ -3280,7 +3280,7 @@ static int gdb_v_packet(struct connection *connection,
 
        /* if flash programming disabled - send a empty reply */
 
-       if (gdb_flash_program == 0) {
+       if (!gdb_flash_program) {
                gdb_put_packet(connection, "", 0);
                return ERROR_OK;
        }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)