Re: stepping problem with sh4, gdbserver
"peter garrone" <[email protected]>
| Newsgroups | gmane.comp.gdb.general |
|---|---|
| Message-ID | <[email protected]> |
I made some errors due to fact the copy of gdb was optimised. apologies. The break PC for the prior run of handle_inferior_event was assumed to be the current runs value. > > Hi, > While debugging remotely with gdbserver and stepping the gdb > (6.3) test program "break.c" at line 96, the "next" command causes > a segfault at frame.c line 1244 (frame->next != NULL) because frame > is null. The relevant backtrace is: > > get_frame_pc(frame = 0) frame.c:1244 > insert_step_resume_breakpoint_at_frame(return_frame=0) infrun.c:2670 > handle_inferior_event infrun.c:2449 > wait_for_inferior infrun.c:991 > > Tracing the execution of gdb itself, handle_inferior_event is > invoked when the target hits a break at the subroutine, whereopon gdb sets a break at the subroutine return point. When it hits this return point break, it appears to erroneously pass the frame_id_eq test at infrun.c:2285 The data passed to frame_id_eq is identical to the previous invocation when gdb was servicing the break within the subroutine. According to the block comment, it is only entered when a subroutine is debugged, so I assume this is an error. So gdb appears to be mistakenly assuming that it is in a subroutine when in fact it has returned. > I am using gdb 6.3, but have seen a similar error on previous > versions. Configuration is for sh4-xxx-linux-gnu, gdb_target=linux, > --enable-shared, --enable-threads > The only relevant source change is an include in > gdbserver/linux-sh-low.c where #include <sys/reg.h> is commented > out. > > Any help appreciated. > Peter Garrone > -- -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze