server: gdb: always print target information in multi-target setups 35/4135/2
authorPaul Fertser <fercerpav@gmail.com>
Wed, 17 May 2017 08:03:19 +0000 (11:03 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Sat, 13 Jan 2018 08:44:57 +0000 (08:44 +0000)
When multiple targets are declared, it's not always obvious which
target the connection was made for, this can lead to very confusing
errors.

Reported by zjason on IRC.

Change-Id: I52906320394e89cb6cfe82054a3f94b27c999689
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/4135
Tested-by: jenkins
src/server/gdb_server.c

index 626179c3c921a55ea3e77c8c3ac87cac54ed973f..fc0868b0a3d56d7ae1c27db014fb68c15d904186 100644 (file)
@@ -991,7 +991,9 @@ static int gdb_new_connection(struct connection *connection)
        }
 
        gdb_actual_connections++;
-       LOG_DEBUG("New GDB Connection: %d, Target %s, state: %s",
+       log_printf_lf(all_targets->next != NULL ? LOG_LVL_INFO : LOG_LVL_DEBUG,
+                       __FILE__, __LINE__, __func__,
+                       "New GDB Connection: %d, Target %s, state: %s",
                        gdb_actual_connections,
                        target_name(target),
                        target_state_name(target));

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)