Fix sending memory-map for 64-bit targets. (#348)
See #202. I don't have a proper target with >32-bit flash and memory location, so I've been unable to properly test this. However, if I hack the fespi driver to not do anything and run the 64-bit spike tests I can see that the memory map OpenOCD sends now includes the full 64-bit address space: Debug: 3443 975 gdb_server.c:400 gdb_put_packet_inner(): sending packet '$l<memory-map> <memory type="ram" start="0x00000000" length="0x20000000"/> <memory type="ram" start="0x20000000" length="0xffffffffe0000000"/> </memory-map> It will also do this when the target is 32-bit, but that doesn't seem to have any ill effects on gdb. Change-Id: I0fd070ab7366188ff0259d90386f5e1f6985ce21
This commit is contained in:
@@ -96,7 +96,7 @@ struct gdb_connection {
|
||||
char *thread_list;
|
||||
};
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#define _DEBUG_GDB_IO_
|
||||
#endif
|
||||
|
||||
@@ -1919,11 +1919,10 @@ static int gdb_memory_map(struct connection *connection,
|
||||
if (ram_start != 0)
|
||||
xml_printf(&retval, &xml, &pos, &size,
|
||||
"<memory type=\"ram\" start=\"" TARGET_ADDR_FMT "\" "
|
||||
"length=\"0x%x\"/>\n",
|
||||
ram_start, 0-ram_start);
|
||||
/* ELSE a flash chip could be at the very end of the 32 bit address
|
||||
* space, in which case ram_start will be precisely 0
|
||||
*/
|
||||
"length=\"" TARGET_ADDR_FMT "\"/>\n",
|
||||
ram_start, TARGET_ADDR_MAX - ram_start + 1);
|
||||
/* ELSE a flash chip could be at the very end of the address space, in
|
||||
* which case ram_start will be precisely 0 */
|
||||
|
||||
free(banks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user