gdb: improve error message when gdb connect fails
authorØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 11 Nov 2010 07:50:22 +0000 (08:50 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 11 Nov 2010 07:51:49 +0000 (08:51 +0100)
gdb connect can fail when the flash has not been probed.

During gdb connect, the flash layout is reported, but this
can not be automatically detected for a target that is
powered up and OpenOCD supports connecting to gdb server
even if the target is powered down.

The solution is to turn of the gdb_memory_map feature.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/server/gdb_server.c

index 222af47a0486ebc2dcab316d8d4a3429e9d94325..9503a130a6cfb7b1b9e43c78abe7d2a91657bc22 100644 (file)
@@ -861,7 +861,7 @@ static int gdb_new_connection(struct connection *connection)
                        retval = get_flash_bank_by_num(i, &p);
                        if (retval != ERROR_OK)
                        {
-                               LOG_ERROR("Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect.");
+                               LOG_ERROR("Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.");
                                return retval;
                        }
                }