Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Frederic RISS <frederic.riss@st.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Andreas Schwab <schwab@suse.de>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] New threadnum command for breakpoints
Date: Fri, 28 Jul 2006 14:59:00 -0000	[thread overview]
Message-ID: <1154098563.28300.282.camel@crx549.cro.st.com> (raw)
In-Reply-To: <20060728141339.GA15103@nevyn.them.org>

On Fri, 2006-07-28 at 10:13 -0400, Daniel Jacobowitz wrote:
> On Fri, Jul 28, 2006 at 03:38:41PM +0200, Frederic RISS wrote:
> > Maybe the alternate approach of adding a $thread variable to use in bp
> > conditions ( http://www.sourceware.org/ml/gdb/2006-02/msg00017.html )
> > should be implemented instead ?
> 
> I think that's a better idea.  Although, Vlad used interior_ptid.pid;
> I would have thought that the better choice would be to use GDB's
> internal thread numbering.  (In fact .pid wouldn't even work, that can
> be the same between threads).

Yes. Moreover the user has always access to GDB thread ids (info
threads), but access to other process/thread information isn't enforced
by our target_ops.

I'm all in favor of this idea (mainly because it allows to test for
multiple threads for the same breakpoint), but I think it might be an
issue in some cases:
 * infrun.c detects breakpoint thread mismatch early and has code to
handle thread hops correctly. This code won't be used in case the thread
mismatch is detected only in the breakpoint condition. Couldn't that
cause some problems? (If it's not an issue, we could certainly cleanup
handle_inferior_event to remove that code)
 * I'm also a bit concerned about performance. Evaluating expressions is
heavier that just comparing thread ids. At least in the context I use
this functionality, the faster we resume, the better my system behaves.
I haven't done any real profiling on this this point might be moot. 

Fred.


  parent reply	other threads:[~2006-07-28 14:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 13:44 Frederic RISS
2006-07-28 14:03 ` Andreas Schwab
2006-07-28 14:13   ` Daniel Jacobowitz
2006-07-28 14:20     ` Andreas Schwab
2006-07-28 14:59     ` Frederic RISS [this message]
2006-07-28 15:14       ` Daniel Jacobowitz
2006-07-31  8:32         ` Frederic RISS
2006-07-31 12:53           ` Daniel Jacobowitz
2006-07-31 14:00             ` Frederic RISS
2006-07-31 20:07               ` Frédéric Riss
2006-07-31 20:14                 ` Eli Zaretskii
2006-08-08 18:22                 ` Daniel Jacobowitz
2006-08-08 19:43                   ` Frédéric Riss
2006-08-16 14:15                     ` Frederic RISS
2006-08-31  7:23                       ` Frederic RISS
2006-07-28 14:28   ` Frederic RISS
2006-07-28 14:30     ` Frederic RISS

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=1154098563.28300.282.camel@crx549.cro.st.com \
    --to=frederic.riss@st.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=schwab@suse.de \
    /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