This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb doesn't work very well with dynamic linked binaries
- To: kettenis at wins dot uva dot nl (Mark Kettenis)
- Subject: Re: gdb doesn't work very well with dynamic linked binaries
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Sat, 9 Sep 2000 23:39:12 MET DST
- Cc: gdb at sources dot redhat dot com, eliz at is dot elta dot co dot il
> The bug I mentioned previously is exactly that they're getting
> cleared by the kernel and then not getting restored on return
> to user space, leaving them wrong until the next reschedule :-(
>
> I think I understand the problems now. It basically means that one
> cannot reliably watch area's that are somehow used in system calls.
>
> I suspect that Linux isn't the only kernel with this bug. AFAICS
> FreeBSD also simply disables any (user-space) watchpoints triggered
> from within the kernel. I don't know what the various x86 System V's
> (Solaris, SCO Open Server 5) do, but I wouldn't be surprised if it is
> broken there too.
AFAIK Solaris never provided access to the x86 debug registers.
Starting with Solaris 2.6, support for hardware watchpoints is provided
via procfs (protect pages which contain watchpoint areas, examine address
on pagefault, cause breakpoint if address is within watchpoint area).
Perhaps this scheme (which allows for an arbitrary number of watchpoints)
could be adopted by the Linux kernel.
Debug register access might be valuable for embedded targets, but the
generic x86 target should not assume availability of debug register access.
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de