SIGSEGV on exit from subroutines -- problem with non-stop ?

Pedro Alves pedro@codesourcery.com
Wed Mar 30 21:46:00 GMT 2011


On Monday 07 March 2011 11:00:41, chris.hall.list@highwayman.com wrote:
>    0x00000000004004e4 <+32>:    callq  0x4003b8 <printf@plt>
>    0x00000000004004e9 <+37>:    leaveq 
>    0x00000000004004ea <+38>:    retq   

leaveq is a 1 byte long instruction.  It is also where
a step-resume breakpoint is inserted when "nexting" over
the callq.  In non-stop mode, when the step-resume breakpoint
is removed, it is placed on the "moribund locations" list.
The SIGTRAP reported on the subsequent single-step over the leaveq
is getting confused with a SIGTRAP of that moribund location
(due to decr_pc_after_break == 1 on x86), and so infrun applies
the decr_pc_after_break incorrectly.  All hell break loose afterwards.

That's all I got time to figure out so far.  I haven't thought of
a fix yet.

-- 
Pedro Alves



More information about the Gdb mailing list