Commit 8cb8dcbf authored by David Johnson's avatar David Johnson
Browse files

Fix up gdb/qemu driver to only load status once, effectively.

    /*
     * NB: QEMU's gdb stub removes all breakpoints on '?', so we have to
     * only call this on target attach!  We have to trust our status as
     * TARGET_PAUSED when we call gdb_pause(), if it succeeds.  This
     * must also be the gdb client's default behavior, although I don't
     * think I saw this in the protocol docs.
     */

(And of course gdb stubs always send stop statuses on breakpoint
exception or whatever... so strictly speaking, we don't need to rely on
this call at all.)
parent c8445f1f
Pipeline #1745 passed with stage
in 4 minutes and 38 seconds
......@@ -1526,11 +1526,21 @@ static int gdb_pause(struct target *target,int nowait) {
target_set_status(target,TSTATUS_PAUSED);
gstate->rsp_status_valid = 0;
/*
* NB: QEMU's gdb stub removes all breakpoints on '?', so we have to
* only call this on target attach! We have to trust our status as
* TARGET_PAUSED when we call gdb_pause(), if it succeeds. This
* must also be the gdb client's default behavior, although I don't
* think I saw this in the protocol docs.
*/
/*
status = gdb_rsp_load_status(target);
if (status == TSTATUS_UNKNOWN || status == TSTATUS_ERROR)
vwarn("could not reload GDB stub status target %s after pause!\n",
target->name);
else
*/
gstate->rsp_status_valid = 1;
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment