aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-25 16:38:08 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-25 16:38:08 -0800
commit2653b8030722c85393974cd6c0ebcdbd1ae27c72 (patch)
tree4cec04ac8f4f71678be236752b860724708144d8 /src/server
parentb715a81f5b95144118d8f946d4191f1dc844783a (diff)
downloadriscv-openocd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.zip
riscv-openocd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.tar.gz
riscv-openocd-2653b8030722c85393974cd6c0ebcdbd1ae27c72.tar.bz2
target: create and use target_name()
Several of the sites now using target_type_name() really ought to be using an instance-specific name. Create a function called target_name(), accessing the instance's own (command) name. Use it in several places that really should be displaying instance-specific names. Also in several places which were already doing so, but which had no wrapper to call. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index f733e7b..bd1d047 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -774,7 +774,7 @@ int gdb_new_connection(struct connection *connection)
gdb_actual_connections++;
LOG_DEBUG("New GDB Connection: %d, Target %s, state: %s",
gdb_actual_connections,
- gdb_service->target->cmd_name,
+ target_name(gdb_service->target),
target_state_name(gdb_service->target));
return ERROR_OK;
@@ -792,7 +792,7 @@ int gdb_connection_closed(struct connection *connection)
gdb_actual_connections--;
LOG_DEBUG("GDB Close, Target: %s, state: %s, gdb_actual_connections=%d",
- gdb_service->target->cmd_name,
+ target_name(gdb_service->target),
target_state_name(gdb_service->target),
gdb_actual_connections);
@@ -2138,7 +2138,7 @@ int gdb_input_inner(struct connection *connection)
watchpoint_clear_target(gdb_service->target);
command_run_linef(connection->cmd_ctx,
"ocd_gdb_restart %s",
- target->cmd_name);
+ target_name(target));
break;
default:
/* ignore unkown packets */
@@ -2216,7 +2216,7 @@ int gdb_init(void)
add_service("gdb", CONNECTION_PIPE, 0, 1, gdb_new_connection, gdb_input, gdb_connection_closed, gdb_service);
LOG_DEBUG("gdb service for target %s using pipes",
- target_type_name(target));
+ target_name(target));
}
else
{
@@ -2233,7 +2233,7 @@ int gdb_init(void)
gdb_connection_closed, gdb_service);
LOG_DEBUG("gdb service for target %s at TCP port %i",
- target_type_name(target),
+ target_name(target),
port);
target = target->next;
port++;