rtos: add custom stack read function
This is optional field for the targets which has to implement their custom stack read function. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Icbc9ed66a052fc2cc0ef67e3ec4d85ab0c2c1b94 Reviewed-on: https://review.openocd.org/c/openocd/+/7442 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
dfbbfac4d7
commit
59bc761d56
@@ -632,7 +632,10 @@ int rtos_generic_stack_read(struct target *target,
|
||||
|
||||
if (stacking->stack_growth_direction == 1)
|
||||
address -= stacking->stack_registers_size;
|
||||
retval = target_read_buffer(target, address, stacking->stack_registers_size, stack_data);
|
||||
if (stacking->read_stack)
|
||||
retval = stacking->read_stack(target, address, stacking, stack_data);
|
||||
else
|
||||
retval = target_read_buffer(target, address, stacking->stack_registers_size, stack_data);
|
||||
if (retval != ERROR_OK) {
|
||||
free(stack_data);
|
||||
LOG_ERROR("Error reading stack frame from thread");
|
||||
|
||||
Reference in New Issue
Block a user