home *** CD-ROM | disk | FTP | other *** search
- I'm trying to get gdb working here on my 613-based kernel, but
- am currently hung up in u-area stuff. I'm hoping there are some kernel
- gurus out there who help me understand this.
-
- At various points, gdb needs to get CPU register values from
- the process being debugged; it uses ptrace() for this. What the
- amiga-specific code (based on the hp300 code) in gdb does first when it
- wants a register value is use ptrace() to get the u.u_kproc.kp_proc.p_regs
- pointer from the inferior process. This is supposed to point to a
- frame structure which contains a copy of the inferior's exception stack
- frame (at least it contains the same kind of stuff -- cpu context).
- The gdb code then uses this address (appropriately indexed) in another
- ptrace() call to actually get the register value. OK, sounds good.
- The problem is that u.u_kproc.kp_proc.p_regs is set up by the CPU trap
- code to point into the frame structure that is passed to it by value.
- In other words, p_regs points somewhere on the interrupt stack. Oops.
- ptrace EFAULTs on these addresses, but even if it didn't, how can the
- pointer still point to something valid?
-
- This has really got me stumped.
-
- --
- ------------------------------------------------------------------------
- Andy Heffernan ahh@netcom.com
-
-