This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: nm.h, *-nat.c and multi-arch?
> Date: Wed, 04 Jul 2001 12:11:58 -0400
>> From: Andrew Cagney <ac131313@cygnus.com>
>>
>> o customize to enable
>> extra (OS/arch specific?) features.
>> (The i386 hw breakpoint code
>> comes to mind.)
>>
>> Here again, I think this should really
>> be host independant.
>
>
> I don't think it's possible, based on many hours of staring at the
> various implementations of hw breakpoints. The differences are not
> always major, but IMHO significant enough to render any attempt to
> unify them be a huge effort with a very small benefit.
>
> Even IA64 is sufficiently different from IA32 so as to prevent any
> reasonable attempt to unify the code which handles watchpoints.
I suspect I misspook. I wouldn't expect some sort of unification of
hardware breakpoints between different architectures (ia 32 vs ia 64).
I was thinking more of better unification within an architecture.
For instance, a hardware breakpoint mechanism implemented purely as
register reads/writes shouldn't need to do anything like access ptrace()
directly. Instead it should just access the target layer below it which
(hopefully) is making available all the registers it needs.
A hardware breakpoint mechanism that required magic system calls, on the
other hand, should be part of NAT.
Andrew