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:
zwelch
2009-05-31 11:31:27 +00:00
parent 17fa4de854
commit 0de78ed02c
5 changed files with 26 additions and 8 deletions
+5 -2
View File
@@ -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;
}
}