From d979d78e97786667d168ba183c9fc60c622d29c1 Mon Sep 17 00:00:00 2001 From: Hsiangkai Wang Date: Tue, 7 May 2013 21:43:35 +0800 Subject: gdb_server: support gdb target description * Add a parameter in .get_gdb_reg_list() to return different register lists as generating target description. * Modify STRUCT REG to let gdb generate target description according to register information. The modified structure of register is struct reg { const char *name; uint32_t number; /* for regnum="num" */ struct reg_feature *feature; /* for register group feature name */ bool caller_save; /* for save-restore="yes|no" */ void *value; bool dirty; bool valid; bool exist; uint32_t size; struct reg_data_type *reg_data_type; /* for type="type" */ const char *group; /* for group="general|float|vector" */ void *arch_info; const struct reg_arch_type *type; }; Change-Id: I2096b67adf94518ba0b8b23d8c6a9f64ad7932b8 Signed-off-by: Hsiangkai Wang Reviewed-on: http://openocd.zylin.com/1382 Tested-by: jenkins Reviewed-by: Franck Jullien Reviewed-by: Spencer Oliver Reviewed-by: Andreas Fritiofson --- src/rtos/linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rtos/linux.c') diff --git a/src/rtos/linux.c b/src/rtos/linux.c index 0fc7635..80d84d7 100644 --- a/src/rtos/linux.c +++ b/src/rtos/linux.c @@ -226,7 +226,8 @@ static int linux_os_thread_reg_list(struct rtos *rtos, /*LOG_INFO("thread %lx current on core %x",thread_id, * target->coreid);*/ retval = - target_get_gdb_reg_list(target, ®_list, ®_list_size); + target_get_gdb_reg_list(target, ®_list, ®_list_size, + REG_CLASS_GENERAL); if (retval != ERROR_OK) return retval; @@ -498,7 +499,7 @@ int get_current(struct target *target, int create) int retval; if (target_get_gdb_reg_list(head->target, ®_list, - ®_list_size) != ERROR_OK) { + ®_list_size, REG_CLASS_GENERAL) != ERROR_OK) { free(buffer); return ERROR_TARGET_FAILURE; } -- cgit v1.1