summaryrefslogtreecommitdiff
path: root/src/server/gdb_server.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-16 10:55:08 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-16 10:55:08 +0000
commit2a781c0346fbb6817411fb0dbfb4ff3b6576d676 (patch)
tree8c9076687dd5a9e411a5da61aa0de92adc10c24c /src/server/gdb_server.c
parent498c87bf02aaaa6cf0f7305ee2c77c7180fb8c16 (diff)
downloadopenocd_libswd-2a781c0346fbb6817411fb0dbfb4ff3b6576d676.tar.gz
openocd_libswd-2a781c0346fbb6817411fb0dbfb4ff3b6576d676.tar.bz2
openocd_libswd-2a781c0346fbb6817411fb0dbfb4ff3b6576d676.tar.xz
openocd_libswd-2a781c0346fbb6817411fb0dbfb4ff3b6576d676.zip
allow setting/reading gdb_port at any time
git-svn-id: svn://svn.berlios.de/openocd/trunk@1247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server/gdb_server.c')
-rw-r--r--src/server/gdb_server.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 72f14095..3f9e1e71 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -180,7 +180,7 @@ int gdb_get_char(connection_t *connection, int* next_char)
return retval;
gdb_con->buf_cnt = read_socket(connection->fd, gdb_con->buffer, GDB_BUFFER_SIZE);
}
-
+
if (gdb_con->buf_cnt > 0)
{
break;
@@ -276,7 +276,7 @@ int gdb_write(connection_t *connection, void *data, int len)
gdb_connection_t *gdb_con = connection->priv;
if (gdb_con->closed)
return ERROR_SERVER_REMOTE_CLOSED;
-
+
if (connection->service->type == CONNECTION_PIPE)
{
/* write to stdout */
@@ -2205,7 +2205,7 @@ int gdb_init(void)
if (server_use_pipes)
{
/* only a single gdb connection when using a pipe */
-
+
gdb_service = malloc(sizeof(gdb_service_t));
gdb_service->target = target;
@@ -2221,12 +2221,12 @@ int gdb_init(void)
gdb_service->target = target;
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);
target = target->next;
}
}
-
+
return ERROR_OK;
}
@@ -2377,7 +2377,7 @@ int handle_gdb_breakpoint_override_command(struct command_context_s *cmd_ctx, ch
int gdb_register_commands(command_context_t *command_context)
{
register_command(command_context, NULL, "gdb_port", handle_gdb_port_command,
- COMMAND_CONFIG, "daemon configuration command gdb_port");
+ COMMAND_ANY, "daemon configuration command gdb_port");
register_command(command_context, NULL, "gdb_detach", handle_gdb_detach_command,
COMMAND_CONFIG, "");
register_command(command_context, NULL, "gdb_memory_map", handle_gdb_memory_map_command,