This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ia64 register cache (not!)


David Lecomber <david@lecomber.net> wrote:

Dear all,

The ia64 (on suse9.3) of gdb seems to not use the PTRACE_GETREGS, but
goes fetching each register in turn.  This seems a bit crazy, and the
source of some very slow behaviour (given the number of ia64 registers!).

There seems to be some source that was intended to handle the GETREGS
but is probably not being called (ia64-linux-nat.c).

When I debug, gdb is definitely calling the fetch_inferior_registers
defined inside infptrace.c (btw, this is GDB from June'05, but it seems
that the excessive ptrace behaviour is the same in most recent CVS too)..

Anyone have an idea why it's this way?  I've watched how gdb handles the
i386 version -- going off into fetch_inferior_registers in i386-linux-nat.c.

Are you sure the ia64 kernel supports the PTRACE_GETREGS/PTRACE_SETREGS requests? If those are implemented someone really should add support for them. Note that even if the current kernels do, there may be older kernels that don't have these. A possible solution would be to use PTRACE_GETREGS if available and fall back on PTRACE_PEEK_USER if it isn't (that's what we do on Linux/i386). But if kernels without PTRACE_GETREGS are no longer in widespread use, it's probably not worth bothering.

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]