GDB monitor commands now also get halted state upon e.g. "reset halt".
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 5 Aug 2008 14:58:37 +0000 (14:58 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 5 Aug 2008 14:58:37 +0000 (14:58 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@892 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/openocd.c
src/server/telnet_server.c

index c694b6a8afe3d6d5cbaf56b9b25f0896723bd8a3..67d890ecd0d883b2a6d594e09de5667285bae28e 100644 (file)
@@ -74,6 +74,22 @@ void exit_handler(void)
                jtag->quit();
 }
 
+static int log_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv)
+{
+       switch (event)
+       {
+               case TARGET_EVENT_HALTED:
+                       target_arch_state(target);
+                       break;
+               default:
+                       break;
+       }
+
+       return ERROR_OK;
+}
+
+
+
 /* OpenOCD can't really handle failure of this command. Patches welcome! :-) */
 int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
@@ -128,6 +144,10 @@ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **arg
        gdb_init();
        tcl_init(); /* allows tcl to just connect without going thru telnet */
 
+       target_register_event_callback(log_target_callback_event_handler, cmd_ctx);
+
+       
+       
        return ERROR_OK;
 }
 
index 004f4ac38ce467f15c9cd839c3810b1995472335..c5b6bf5f97b203053ed32291028cd8098c3653a9 100644 (file)
@@ -144,20 +144,6 @@ void telnet_log_callback(void *priv, const char *file, int line,
                telnet_write(connection, "\b", 1);
 }
 
-int telnet_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv)
-{
-       switch (event)
-       {
-               case TARGET_EVENT_HALTED:
-                       target_arch_state(target);
-                       break;
-               default:
-                       break;
-       }
-
-       return ERROR_OK;
-}
-
 int telnet_new_connection(connection_t *connection)
 {
        telnet_connection_t *telnet_connection = malloc(sizeof(telnet_connection_t));
@@ -197,8 +183,6 @@ int telnet_new_connection(connection_t *connection)
        telnet_connection->next_history = 0;
        telnet_connection->current_history = 0;
 
-       target_register_event_callback(telnet_target_callback_event_handler, connection->cmd_ctx);
-
        log_add_callback(telnet_log_callback, connection);
 
 
@@ -601,8 +585,6 @@ int telnet_connection_closed(connection_t *connection)
                LOG_ERROR("BUG: connection->priv == NULL");
        }
 
-       target_unregister_event_callback(telnet_target_callback_event_handler, connection->cmd_ctx);
-
        return ERROR_OK;
 }
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)