RE: Step causes GDB to spin in infinite loop when PC doesn't change
"Denio, Mike via Gdb" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
I have a work-around that is a bit of a hack. I realized that the issue is the ^C is being sent to me after I report stop, but before GDB processes the stop. This is very similar to my original issue on my first email thread.
The same fix can cannot be applied though. In that fix, I simply ignored vCont commands for event pended threads. In this case however, I need to send a Stop with Signal 02, but I have already sent that stop event with Signal 05. My hack fix is to apply the signal 02 to the subsequent event for that thread. Its messy, but it only affects vCtrlC, so hopefully won't cause any issues.
If there is some way for me so send a stop signal to a thread that is already stopped, that would be cleaner. So any advice is appreciated.
Thanks for all the feedback, as always.
Mike
//------------------------------------------------------------
// The ^C sequence in the log. Note the T02 is applied
// to the vCont command that is AFTER the vCtrlC which
// I'm not 100% comfortable with
'vCont;s:2' --->
<--- '$OK#9a'
<--- '%Stop:T05thread:2;#b8'
'vCtrlC' --->
<--- '$OK#9a'
'vStopped' --->
<--- '$OK#9a'
'g' --->
<--- '$000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000#84'
'vCont;s:2' --->
<--- '$OK#9a'
<--- '%Stop:T02thread:2;#b5'
'vStopped' --->
<--- '$OK#9a'
'g' --->
<--- '$000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000#84'
'qfThreadInfo' --->
<--- '$m1,2#fc'
'qsThreadInfo' --->
<--- '$l#6c'
//------------------------------------------------------------
// GDB Output
(gdb) tar ext :9998
Remote debugging using :9998
(gdb) interrupt -a
(gdb)
Thread 1 stopped.
endz () at r5_tests/smoke/boot.S:8
8 endz: jal x0,endz
Thread 2 stopped.
endz () at r5_tests/smoke/boot.S:8
8 endz: jal x0,endz
s
^C
Thread 2 received signal SIGINT, Interrupt.
endz () at r5_tests/smoke/boot.S:8
8 endz: jal x0,endz