From: David B. <dbr...@us...> - 2010-02-14 21:59:33
|
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 52d4ba3467134a1489583dbb6d6de3002f0f76fa (commit) from a2ce3a51dfbc9760e7a4e3f5d5806a1de019721d (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 52d4ba3467134a1489583dbb6d6de3002f0f76fa Author: Mathias Kuester <mk...@us...> Date: Sun Feb 14 12:59:10 2010 -0800 fix crash with DSP563XX When a DSP563xx-aware GDB asks OpenOCD for target registers, the result should be a GDB with register data ... not an OpenOCD crash. (Note that mainline GDB doesn't currently support this core, so for now, this requires a GDB with FreeScale patches.) Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index 9e2f609..049ee1a 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -246,6 +246,29 @@ static const struct /* *INDENT-ON* */ }; +static int dsp563xx_get_gdb_reg_list(struct target *target, struct reg **reg_list[], + int *reg_list_size) +{ + struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target); + int i; + + if (target->state != TARGET_HALTED) + { + return ERROR_TARGET_NOT_HALTED; + } + + *reg_list_size = DSP563XX_NUMCOREREGS; + *reg_list = malloc(sizeof(struct reg *) * (*reg_list_size)); + + for (i = 0; i < DSP563XX_NUMCOREREGS; i++) + { + (*reg_list)[i] = &dsp563xx->core_cache->reg_list[i]; + } + + return ERROR_OK; + +} + int dsp563xx_read_core_reg(struct target *target, int num) { uint32_t reg_value; @@ -974,6 +997,8 @@ struct target_type dsp563xx_target = { .target_request_data = NULL, + .get_gdb_reg_list = dsp563xx_get_gdb_reg_list, + .halt = dsp563xx_halt, .resume = dsp563xx_resume, .step = dsp563xx_step, ----------------------------------------------------------------------- Summary of changes: src/target/dsp563xx.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |