Thu Jun 23 14:21:52 CEST 2011
gdb can't connect if target error
It might be best to modify such that gdb is allowed to connect such
that it can issue a "mon reset init" command.
Error: Target not halted
Error: auto_probe failed
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'.
Error: attempted 'gdb' connection rejected
That error is printed in server.c when (abstractly) ->new_connection()
fails. The implementation of that function is in gdb_server.c :
static int gdb_new_connection(struct connection *connection);
The cause seems to be this:
Connect must fail if the memory map can't be set up correctly.
Maybe this should trigger some retry somewhere?
To switch off memory map:
but of course you can't do this from the gdb side..
Some more info about that particular patch here. So it's probably
not a good idea to start prodding there, but to use the `gdb-attach'