From 0de78ed02c7e2caaf96eafb814c6059ceb9582b2 Mon Sep 17 00:00:00 2001 From: zwelch Date: Sun, 31 May 2009 11:31:27 +0000 Subject: Add target_get_name wrapper: - replaces all accesses to target->type->name. - add documentation in target_s to warn not to access field directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1966 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/server/gdb_server.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/server/gdb_server.c') diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 23748e7..d5c3f35 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2211,7 +2211,8 @@ 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); + LOG_DEBUG("gdb service for target %s using pipes", + target_get_name(target)); } else { @@ -2222,7 +2223,9 @@ int gdb_init(void) add_service("gdb", CONNECTION_TCP, gdb_port + target->target_number, 1, gdb_new_connection, gdb_input, gdb_connection_closed, gdb_service); - LOG_DEBUG("gdb service for target %s at port %i", target->type->name, gdb_port + target->target_number); + LOG_DEBUG("gdb service for target %s at port %i", + target_get_name(target), + gdb_port + target->target_number); target = target->next; } } -- cgit v1.1