Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Fabian Cenedese <Cenedese@indel.ch>
To: gdb@sources.redhat.com
Subject: Re: Thread-specific breakpoints
Date: Mon, 16 Aug 2004 14:20:00 -0000	[thread overview]
Message-ID: <5.2.0.9.1.20040816154657.01ce05d0@NT_SERVER> (raw)
In-Reply-To: <20040816132633.GA23408@nevyn.them.org>


>> Is there support for thread-specific breakpoints in gdb? I couldn't see it
>> in the interface/commands. If not, are there plans to add it to gdb?
>> 
>> I know that other people have already tried to do so, e.g. SmartGDB
>> http://hegel.ittc.ukans.edu/projects/smartgdb/brief.html
>> 
>> But this a workaround with the help of tcl and only supports some
>> thread libs. As I need support over a stub for a proprietary system
>> (not Linux) this won't work.
>
>What features do you need from thread-specific breakpoints?  It could
>mean several things.
>
>The closest GDB comes is "break <location> thread <number>".

Yes, that's along the lines I was thinking. And after intense looking I even
found it in the manual. I missed it the first time as the break command
is explained in 5.1.1 whereas break <location> thread <number> by itself
is in 5.4.

After looking at the communication with the stub it seems that the Z0
packet only informs the stub about a breakpoint but not about the thread.
So every thread will stop here and gdb needs to tell them to continue
it it's not the wanted one. That could generate quite a lot of communication
(important if it's a serial connection) and also changes the timing quite
a lot. If the breakpoint handling was in the stub the stop'n'go could be
made much faster without the interaction of gdb. I guess if there is no
other possibility I could use the "monitor" command to inform the stub
about the thread of the breakpoint. But then again this is difficult as the
breakpoints are only set once a "step" or "continue" is sent...

Thanks for the help anyway

bye  Fabi



  reply	other threads:[~2004-08-16 14:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16  7:18 Fabian Cenedese
2004-08-16 13:26 ` Daniel Jacobowitz
2004-08-16 14:20   ` Fabian Cenedese [this message]
2004-08-16 14:24     ` Daniel Jacobowitz
2004-08-16 19:30     ` Eli Zaretskii
2004-08-17  8:07       ` Fabian Cenedese
2004-08-18  3:57         ` Eli Zaretskii
2004-08-18 11:57 Fabian Cenedese
2004-08-26 22:50 ` Paul Breed
2004-08-27  7:37   ` Fabian Cenedese

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=5.2.0.9.1.20040816154657.01ce05d0@NT_SERVER \
    --to=cenedese@indel.ch \
    --cc=gdb@sources.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