On Fri, 6 Aug 2004 13:26:32 -0700, Randolph Chung <[EMAIL PROTECTED]> wrote: >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....
With kdb, you get what you asked for. If you ask for a break point at offset 0 of a function, that is what kdb does. Think assembler functions, which gdb cannot handle. The i386 kdb patch has its own heuristics for working out how far into the function the breakpoint is and for working out what state the stack is at that point. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
