diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-23 19:03:16 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-23 19:03:16 +0000 |
commit | a332b4e8c4c74726ed20a42baea54cf80e0b9315 (patch) | |
tree | 105207b37c550bf05e4c8709838d62ad199c7789 /src | |
parent | 2637bbccaf12edd22bc6d82759b1e3c187d303a1 (diff) | |
download | openocd_libswd-a332b4e8c4c74726ed20a42baea54cf80e0b9315.tar.gz openocd_libswd-a332b4e8c4c74726ed20a42baea54cf80e0b9315.tar.bz2 openocd_libswd-a332b4e8c4c74726ed20a42baea54cf80e0b9315.tar.xz openocd_libswd-a332b4e8c4c74726ed20a42baea54cf80e0b9315.zip |
fix <memory> is missing upon gdb connect warning when no flash is defined for target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@861 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/server/gdb_server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index ffbd8d0d..8db55df0 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1505,7 +1505,7 @@ int gdb_query_packet(connection_t *connection, target_t *target, char *packet, i xml_printf(&retval, &buffer, &pos, &size, "PacketSize=%x;qXfer:memory-map:read%c;qXfer:features:read-", - (GDB_BUFFER_SIZE - 1), gdb_use_memory_map == 1 ? '+' : '-'); + (GDB_BUFFER_SIZE - 1), ((gdb_use_memory_map == 1)&&(flash_get_bank_count()>0)) ? '+' : '-'); if (retval != ERROR_OK) { @@ -1518,7 +1518,7 @@ int gdb_query_packet(connection_t *connection, target_t *target, char *packet, i return ERROR_OK; } - else if (strstr(packet, "qXfer:memory-map:read::")) + else if (strstr(packet, "qXfer:memory-map:read::")&&(flash_get_bank_count()>0)) { /* We get away with only specifying flash here. Regions that are not * specified are treated as if we provided no memory map(if not we |