gdb: fix multi core gdb issue
gdb_memory_map() correctly calculates the target specific number of flash banks, but then uses the total number (all targets) instead of the target specific number to construct its GDB response, causing a crash. Change-Id: I3f8639b3e90303a59753ebe140ce4fff96fd5db0 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/199 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
parent
6eb18b307a
commit
950f240519
|
@ -1741,7 +1741,7 @@ static int gdb_memory_map(struct connection *connection,
|
|||
qsort(banks, target_flash_banks, sizeof(struct flash_bank *),
|
||||
compare_bank);
|
||||
|
||||
for (i = 0; i < flash_get_bank_count(); i++) {
|
||||
for (i = 0; i < target_flash_banks; i++) {
|
||||
int j;
|
||||
unsigned sector_size = 0;
|
||||
uint32_t start;
|
||||
|
|
Loading…
Reference in New Issue