* ia64 register cache (not!)
@ 2006-02-09 12:30 David Lecomber
2006-02-09 14:16 ` M.M. Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: David Lecomber @ 2006-02-09 12:30 UTC (permalink / raw)
To: gdb
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.
d.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ia64 register cache (not!)
2006-02-09 12:30 ia64 register cache (not!) David Lecomber
@ 2006-02-09 14:16 ` M.M. Kettenis
2006-02-09 14:19 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: M.M. Kettenis @ 2006-02-09 14:16 UTC (permalink / raw)
To: David Lecomber, gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ia64 register cache (not!)
2006-02-09 14:16 ` M.M. Kettenis
@ 2006-02-09 14:19 ` Daniel Jacobowitz
2006-02-09 14:40 ` David Lecomber
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-02-09 14:19 UTC (permalink / raw)
To: M.M. Kettenis; +Cc: David Lecomber, gdb
On Thu, Feb 09, 2006 at 02:15:53PM +0000, M.M. Kettenis wrote:
> 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.
FYI, it wasn't in the very original ia64 port, but was added about four
years ago.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ia64 register cache (not!)
2006-02-09 14:19 ` Daniel Jacobowitz
@ 2006-02-09 14:40 ` David Lecomber
0 siblings, 0 replies; 4+ messages in thread
From: David Lecomber @ 2006-02-09 14:40 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: M.M. Kettenis, gdb
On Thu, 2006-02-09 at 09:19 -0500, Daniel Jacobowitz wrote:
> On Thu, Feb 09, 2006 at 02:15:53PM +0000, M.M. Kettenis wrote:
> > 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.
>
> FYI, it wasn't in the very original ia64 port, but was added about four
> years ago.
That sounds about right - I think RH AS 2.1 does not support it, but RH
EL 4 does have GETREGS.
Note the ptrace() man page on IA64 refers to PTRACE_GETFPREGS -- and
that definitely does *not* exist!!
Cheers
d.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-09 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-09 12:30 ia64 register cache (not!) David Lecomber
2006-02-09 14:16 ` M.M. Kettenis
2006-02-09 14:19 ` Daniel Jacobowitz
2006-02-09 14:40 ` David Lecomber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox