kdb
[Top] [All Lists]

question about setting breakpoint on functions

To: kdb@xxxxxxxxxxx
Subject: question about setting breakpoint on functions
From: Randolph Chung <randolph@xxxxxxxxx>
Date: Fri, 6 Aug 2004 13:26:32 -0700
Reply-to: Randolph Chung <randolph@xxxxxxxxx>
Sender: kdb-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.5.1+cvs20040105i
Hi,

I'm trying to update the parisc kdb patch for 2.6 kernels. it's working,
but i have a question about how this problem should be handled in kdb...

when a breakpoint is placed on a function (e.g. "bp sys_open"), kdb
currently inserts a breakpoint at the function address itself. when the
breakpoint is hit, and you do a backtrace from kdb, you need to be able
to unwind from the very first insn of the function, before the prologue
of the function has setup a proper stack frame. is this the desired
behaviour?

alternatively, e.g. in gdb, when a breakpoint is placed on a function,
the breakpoint logic skips the prologue of the function using a
target-specific hook, so that the breakpoint is placed just after the
prologue. as a result, when such a breakpoint is hit, you will be able
to do regular unwinding to retrieve items from the stack frame. is this
worth considering for kdb?

of course, one could always put a breakpoint at a specific address that
happens to be the first addrses of the function, and unwinding should
still work to some extent in that case....

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
<Prev in Thread] Current Thread [Next in Thread>