From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: Jeff Johnston <jjohnstn@redhat.com>, Eli Zaretskii <eliz@gnu.org>,
gdb-patches@sources.redhat.com
Subject: Re: [RFA]: Watchpoints per thread patch
Date: Fri, 05 Nov 2004 16:52:00 -0000 [thread overview]
Message-ID: <418BAFC9.6050705@gnu.org> (raw)
In-Reply-To: <20041105044917.GA13554@nevyn.them.org>
Daniel Jacobowitz wrote:
> On Thu, Nov 04, 2004 at 01:25:32PM -0500, Jeff Johnston wrote:
>
>>Daniel, I have moved the observer notification to add_thread as suggested.
>>To do this, I had to move a few things in attach_thread. As well, I had to
>>add another part of my full patch in because the ptid that add_thread knows
>>about is in the wrong format (pid, 0, tid). The low-level insert
>>watchpoint code needs the lwp so I have added in my target_get_lwp change.
>>I realize you have plans to change how the ptid is kept, but until that is
>>fleshed out, this change is required. I used a call-back to allow
>>breakpoint.c which knows how to handle watchpoints to communicate with the
>>low-level linux code that knows how to insert/remove a watchpoint.
>
>
> I don't want to add target_get_lwp only to remove it a couple weeks
> later! I don't think this patch is appropriate for 6.3; for the
> mainline, we have plenty of time, so please wait a little longer.
You're correct, it definitly isn't appropriate for 6.3. However, it is
appropriate for mainline. Lets get this patch off the table (and have
working watchpoints), that way we're in a position to better focus on
just the refactorings you talk of. Especially since, this work gives us
a working test case that we can refactor against.
Sound reasonable?
> You were going to fix this bit.
>
> Also, I have been thinking about your approach. You are hooking native
> code in via an observer; observers bypass the target stack. It worked
> while you were only calling this observer from the GNU/Linux native
> support in thread-db.c. But now it will mess up if you use a native
> ia64 debugger connected to a remote target, in which case we should
> never enter the ia64-nat code - there's nothing to ptrace.
Jeff,
I'd use the cludge based on what is found in remote.c:
if (!current_target.to_shortname ||
strcmp (current_target.to_shortname, "remote") != 0)
error ("command can only be used with remote target");
we need to solve the problem daniel describes but that involves
structural change.
> The observer could move back to thread-db, but as Andrew keeps
> reminding me, there are situations where we could take advantage of
> thread-db for things like core files. This is a target stack activity;
> I think we need to find a way to do it without violating the
> abstraction of the target stack.
There are two concurrency abstractions:
- light-weight-processes
system level
- threads
user level
burried in the target stack, here the code is manipulating the former,
thread-db manipulates the latter. That the abstractions are not clearly
separated is a design flaw, but not one we're going to immediatly fix here.
Andrew
next prev parent reply other threads:[~2004-11-05 16:52 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-19 23:57 Jeff Johnston
2004-10-20 5:04 ` Eli Zaretskii
2004-10-20 11:03 ` Mark Kettenis
2004-10-20 16:21 ` Jeff Johnston
2004-10-20 17:27 ` Andrew Cagney
2004-10-20 17:30 ` Daniel Jacobowitz
2004-10-27 22:36 ` Jeff Johnston
2004-10-27 22:41 ` Daniel Jacobowitz
2004-10-27 23:17 ` Jeff Johnston
2004-10-28 13:33 ` Daniel Jacobowitz
2004-10-28 19:47 ` Jeff Johnston
2004-10-28 19:52 ` Daniel Jacobowitz
2004-10-28 20:13 ` Jeff Johnston
2004-10-28 4:55 ` Eli Zaretskii
2004-11-04 18:25 ` Jeff Johnston
2004-11-04 21:21 ` Eli Zaretskii
2004-11-05 4:49 ` Daniel Jacobowitz
2004-11-05 16:52 ` Andrew Cagney [this message]
2004-11-05 18:29 ` Daniel Jacobowitz
2004-11-08 21:33 ` Andrew Cagney
2004-11-09 1:04 ` Daniel Jacobowitz
2004-11-09 2:20 ` Andrew Cagney
2004-11-09 2:33 ` Daniel Jacobowitz
2004-11-09 4:53 ` Eli Zaretskii
2004-11-09 15:11 ` Andrew Cagney
2004-11-09 18:41 ` Daniel Jacobowitz
2004-11-11 21:22 ` Andrew Cagney
2004-11-09 19:06 ` Jeff Johnston
2004-11-09 19:31 ` Daniel Jacobowitz
2004-11-09 20:24 ` Jim Blandy
2004-11-10 0:02 ` Jeff Johnston
2004-11-10 14:39 ` Jim Blandy
2004-11-11 21:23 ` Andrew Cagney
2004-11-09 20:48 ` Jeff Johnston
2004-11-09 20:50 ` Daniel Jacobowitz
2004-11-10 19:45 ` Eli Zaretskii
2004-11-10 22:08 ` Jeff Johnston
2004-11-10 19:43 ` Eli Zaretskii
2004-10-20 19:27 ` Eli Zaretskii
2004-11-05 11:49 Ulrich Weigand
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=418BAFC9.6050705@gnu.org \
--to=cagney@gnu.org \
--cc=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
/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