From: Øyvind H. <go...@us...> - 2009-10-13 13:45:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 530281c469e58e6f37eb500a5562f49fb7d9857e (commit) via 77ca1a4c835a0f6ea0b45ff67c362734ce5331f4 (commit) via 7e424445c1a0caf979e4c0288be111592dd47e57 (commit) from 6bff28fbdb8ae97d29608e15deee8bcf9f9c2316 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 530281c469e58e6f37eb500a5562f49fb7d9857e Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 13 13:44:15 2009 +0200 Retired gdb_attach. gdb-detach event covers this functionality. diff --git a/doc/openocd.texi b/doc/openocd.texi index 479aa17..fd4f9f7 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -1638,11 +1638,6 @@ GDB behaviour is not sufficient. GDB normally uses hardware breakpoints if the memory map has been set up for flash regions. @end deffn -@deffn {Config Command} gdb_detach (@option{resume}|@option{reset}|@option{halt}|@option{nothing}) -Configures what OpenOCD will do when GDB detaches from the daemon. -Default behaviour is @option{resume}. -@end deffn - @anchor{gdb_flash_program} @deffn {Config Command} gdb_flash_program (@option{enable}|@option{disable}) Set to @option{enable} to cause OpenOCD to program the flash memory when a diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index ad09a0e..adf5c68 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -52,17 +52,6 @@ static const char *DIGITS = "0123456789abcdef"; static void gdb_log_callback(void *priv, const char *file, int line, const char *function, const char *string); -enum gdb_detach_mode -{ - GDB_DETACH_RESUME, - GDB_DETACH_RESET, - GDB_DETACH_HALT, - GDB_DETACH_NOTHING -}; - -/* target behaviour on gdb detach */ -enum gdb_detach_mode detach_mode = GDB_DETACH_RESUME; - /* number of gdb connections, mainly to supress gdb related debugging spam * in helper/log.c when no gdb connections are actually active */ int gdb_actual_connections; @@ -1960,29 +1949,11 @@ int gdb_v_packet(connection_t *connection, target_t *target, char *packet, int p int gdb_detach(connection_t *connection, target_t *target) { + gdb_service_t *gdb_service = connection->service->priv; - switch (detach_mode) - { - case GDB_DETACH_RESUME: - target_handle_event(target, TARGET_EVENT_OLD_pre_resume); - target_resume(target, 1, 0, 1, 0); - break; - - case GDB_DETACH_RESET: - /* FIX?? make this configurable?? */ - target_process_reset(connection->cmd_ctx, RESET_HALT); - break; - - case GDB_DETACH_HALT: - target_halt(target); - break; - - case GDB_DETACH_NOTHING: - break; - } + target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_DETACH); - gdb_put_packet(connection, "OK", 2); - return ERROR_OK; + return gdb_put_packet(connection, "OK", 2); } static void gdb_log_callback(void *priv, const char *file, int line, @@ -2311,37 +2282,6 @@ int handle_gdb_port_command(struct command_context_s *cmd_ctx, char *cmd, char * return ERROR_OK; } -int handle_gdb_detach_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) -{ - if (argc == 1) - { - if (strcmp(args[0], "resume") == 0) - { - detach_mode = GDB_DETACH_RESUME; - return ERROR_OK; - } - else if (strcmp(args[0], "reset") == 0) - { - detach_mode = GDB_DETACH_RESET; - return ERROR_OK; - } - else if (strcmp(args[0], "halt") == 0) - { - detach_mode = GDB_DETACH_HALT; - return ERROR_OK; - } - else if (strcmp(args[0], "nothing") == 0) - { - detach_mode = GDB_DETACH_NOTHING; - return ERROR_OK; - } - else - LOG_WARNING("invalid gdb_detach configuration directive: %s", args[0]); - } - - return ERROR_COMMAND_SYNTAX_ERROR; -} - int handle_gdb_memory_map_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { if (argc == 1) @@ -2445,9 +2385,6 @@ int gdb_register_commands(command_context_t *command_context) COMMAND_ANY, "next stepi will return immediately allowing GDB fetch register state without affecting target state"); register_command(command_context, NULL, "gdb_port", handle_gdb_port_command, COMMAND_ANY, "daemon configuration command gdb_port"); - register_command(command_context, NULL, "gdb_detach", handle_gdb_detach_command, - COMMAND_CONFIG, "resume/reset/halt/nothing - " - "specify behavior when GDB detaches from the target"); register_command(command_context, NULL, "gdb_memory_map", handle_gdb_memory_map_command, COMMAND_CONFIG, "enable or disable memory map"); register_command(command_context, NULL, "gdb_flash_program", handle_gdb_flash_program_command, commit 77ca1a4c835a0f6ea0b45ff67c362734ce5331f4 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 13 13:13:29 2009 +0200 Missing type for eCos. diff --git a/src/helper/types.h b/src/helper/types.h index 21a6a33..86b62c2 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -152,6 +152,7 @@ typedef uint64_t uintmax_t; #define INT64_MIN (-INT64_MAX - 1LL) #define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL) +#define ULLONG_MAX 18446744073709551615 /* C99, eCos is C90 compliant (with bits of C99) */ #define isblank(c) ((c) == ' ' || (c) == '\t') commit 7e424445c1a0caf979e4c0288be111592dd47e57 Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Oct 13 12:22:23 2009 +0200 Fix warning. diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c index 57685cf..c9812a1 100644 --- a/src/target/arm11_dbgtap.c +++ b/src/target/arm11_dbgtap.c @@ -590,7 +590,7 @@ int arm11_run_instr_data_to_core_noack(arm11_common_t * arm11, uint32_t opcode, Readies = (uint8_t *) malloc(bytes); if (Readies == NULL) { - LOG_ERROR("Out of memory allocating %d bytes", bytes); + LOG_ERROR("Out of memory allocating " ZU " bytes", bytes); return ERROR_FAIL; } ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 5 --- src/helper/types.h | 1 + src/server/gdb_server.c | 69 ++------------------------------------------- src/target/arm11_dbgtap.c | 2 +- 4 files changed, 5 insertions(+), 72 deletions(-) hooks/post-receive -- Main OpenOCD repository |