From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Eli Zaretskii Cc: gdb@sources.redhat.com Subject: Re: nm.h, *-nat.c and multi-arch? Date: Wed, 04 Jul 2001 11:36:00 -0000 Message-id: <3B4361F7.7040302@cygnus.com> References: <3B43404E.6090805@cygnus.com> <7263-Wed04Jul2001202553+0300-eliz@is.elta.co.il> X-SW-Source: 2001-07/msg00029.html > Date: Wed, 04 Jul 2001 12:11:58 -0400 >> From: Andrew Cagney >> >> 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