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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user