diff options
author | Paul Fertser <fercerpav@gmail.com> | 2017-05-17 11:03:19 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2018-01-13 08:44:57 +0000 |
commit | 12a838c6d4b9232e495285edee76636f87cf32e5 (patch) | |
tree | 19f8f09593e2e0d7d8fd6587ec8a0556802b53e9 /src | |
parent | b95e0c13aa64ebbc8407ce8b974b1efd44df84c9 (diff) |
server: gdb: always print target information in multi-target setups
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
Diffstat (limited to 'src')
-rw-r--r-- | src/server/gdb_server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 626179c3..fc0868b0 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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)); |