Date: Sat, 14 Jun 1997 11:15:44 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@freebsd.org Subject: gdb-remote stepping of spls broken by non-inline spls Message-ID: <199706140115.LAA11120@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
gdb-remote has strange problems with single stepping into splx(). This is probably caused by spl*() changing from inline functions to ordinary ones. gdb apparently uses breakpoints for skipping function prologues, but spltty() and splx() are used by the low level console i/o routines, so putting a breakpoint in them is fatal. spl*() are supposed to be compiled with -fomit-frame-pointer to avoid having prologues for efficiency, but I broke that when I fixed the profiling case (substition on make variables is more irregular than I thought). Compiling with -fomit-frame-pointer seems to have fixed the single stepping problems. Putting a breakpoint in splx() is still fatal. The symptom is that the remote keeps sending '$' and gdb is hard to kill. I'm surprised that it doesn't cause recursive breakpoint traps. There is no problem in ddb, since the debugger removes breakpoints before doing i/o. Remote debuggers should avoid the problem in a similar way, by putting the remote in charge of setting and removing breakpoints on debugger exit and entry. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706140115.LAA11120>