public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@delorie.com>
To: kettenis@wins.uva.nl
Cc: hjl@lucon.org, gdb@sourceware.cygnus.com
Subject: Re: gdb doesn't work very well with dynamic linked binaries
Date: Tue, 05 Sep 2000 08:47:00 -0000	[thread overview]
Message-ID: <200009051546.LAA06234@indy.delorie.com> (raw)
In-Reply-To: <200009051333.e85DXsv12272@debye.wins.uva.nl>

> Date: Tue, 5 Sep 2000 15:33:54 +0200 (MET DST)
> From: Mark Kettenis <kettenis@wins.uva.nl>
> 
> I was thinking of having some sort of register cache for the
> debugging registers but didn't immedeately see the right solution to
> do that.  Perhaps they should simply be added to the register cache?

I think all we need is to store the debug registers somewhere.  They
need to be accessed by (1) the x86-dependent code which is called by
GDB's application level to insert and remove watchpoints; (2) the
target-specific code which actually calls ptrace or the equivalent
syscall to pass the values into the inferior's registers before
resuming it, and set bits after the inferior stops to indicate which
watchpoint(s) triggered; and (3) by stopped_by_watchpoint's target
end.

It's possible that the register cache is as good place as any to store
DRi, even though they slightly differ from the rest of the registers.

> I also couldn't directly see how the hardware watchpoint supports
> interacts with multiple threads

Sorry, I'm not sure I see the problem.  Could you please elaborate?
(I'm afraid I don't know much about Linux threads.)

> especially in presence of the nifty way the go32 code maps multiple
> waitchpoints on a single debugging register.

I don't think this should matter.  The reference counts are just a
means to know which register is used and which isn't.  As far as the
higher-level GDB code is concerned, what's important is (a) which
address, if any, triggered a watchpoint; and (b) which thread caused
the watchpoint to trigger.

However, if I'm missing the point, and there's some additional
infrastructure that is required to make this work with multiple
threads, please tell what is, or might be, missing.

> Apparently nobody cares enough.  It isn't at the top of my priority
> list so if nobody else contributes the necessary code, it probably
> won't happen in the near future.

If v5.1 freeze date is far away, and if the current code in go32-nat.c
is good enough to be used by other x86 platforms, I might take the
silence as a sign of agreement, given the fact that making it happen
is easy... ;-)

  reply	other threads:[~2000-09-05  8:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20000901192328.A28312@valinux.com>
     [not found] ` <200009041047.LAA10659@phal.cygnus.co.uk>
2000-09-04  8:49   ` H . J . Lu
2000-09-04 10:52     ` Mark Kettenis
2000-09-04 11:11       ` Daniel Berlin
2000-09-04 11:22         ` Ulrich Drepper
     [not found]           ` <drepper@redhat.com>
2000-09-05 19:12             ` Kevin Buettner
2000-09-04 16:45       ` H . J . Lu
2000-09-04 22:49         ` Eli Zaretskii
2000-09-04 23:32           ` H . J . Lu
2000-09-05  3:36             ` Eli Zaretskii
2000-09-05  6:34               ` Mark Kettenis
2000-09-05  8:47                 ` Eli Zaretskii [this message]
2000-09-05 17:06                   ` Mark Kettenis
2000-09-05 22:52                     ` Eli Zaretskii
2000-09-05  8:49                 ` H . J . Lu
2000-09-05 18:23                   ` Stan Shebs
2000-09-05 18:33                     ` H . J . Lu
2000-09-05 22:54                       ` Eli Zaretskii
2000-09-05  8:44               ` H . J . Lu
2000-09-05 18:02               ` Stan Shebs
2000-09-05 20:45                 ` H . J . Lu
2000-09-05 22:55                   ` Eli Zaretskii
2000-10-14 23:09                   ` Andrew Cagney
2000-09-05 22:53                 ` Eli Zaretskii
     [not found]               ` <3.0.6.32.20000906001339.00b0ae90@idefix.wisa.be>
2000-09-05 23:08                 ` About unified debug register handling for i386 CPU Eli Zaretskii
2000-09-06 10:10                   ` Chris Faylor
2000-09-06  3:54 gdb doesn't work very well with dynamic linked binaries James Cownie
2000-09-06  4:58 ` Mark Kettenis
2000-09-07  1:55 James Cownie
2000-09-07  3:09 ` Mark Kettenis
2000-09-07  8:02   ` Eli Zaretskii
2000-09-08  8:30     ` Mark Kettenis
2000-09-09 14:39   ` Peter.Schauer
2000-09-07  3:27 James Cownie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200009051546.LAA06234@indy.delorie.com \
    --to=eliz@delorie.com \
    --cc=gdb@sourceware.cygnus.com \
    --cc=hjl@lucon.org \
    --cc=kettenis@wins.uva.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).