Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Peter Wainwright <peter.wainwright@ieee.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb@sources.redhat.com
Subject: Re: GDB <MULTIPLE> breakpoints, source lines
Date: Sat, 14 Feb 2009 12:03:00 -0000	[thread overview]
Message-ID: <1234612972.15489.3.camel@ceiriog.eclipse.co.uk> (raw)
In-Reply-To: <gn6610$r7d$1@ger.gmane.org>

On Sat, 2009-02-14 at 13:22 +0300, Vladimir Prus wrote:
> Peter Wainwright wrote:
> 
> > Hi,
> > 
> > I'm the maintainer of DDD.  I have some questions about the intent of
> > the gdb <MULTIPLE> breakpoints.
> > 
> > "info break" returns several lines for each breakpoint, e.g.
> > 
> > 2.1                         y     0x00007f2e2090c4d4 in
> > VoxelBuffer<char>::buffer_type() const
> >                                                at ../VoxelBuffer.cc:95
> > 2.2                         y     0x00007f2e2090c540 in
> > VoxelBuffer<unsigned char>::buffer_type() const at ../VoxelBuffer.cc:95
> > 2.3                         y     0x00007f2e2090c5ac in
> > VoxelBuffer<short>::buffer_type() const
> >                                                at ../VoxelBuffer.cc:95
> > 
> > The info page on breakpoints mentions 3 use cases: constructors,
> > templates, and inlined functions.  In all 3 cases the multiple locations
> > are generated from a single source line.  However, the "info break"
> > display shows a source file and line number for each location.
> > 
> > My question is: are there any circumstances in which you can get a
> > different source file or line for each location?
> 
> There should be none, except that we had a bug report whereby GDB would
> create multiple location breakpoint where each location has the same
> line number and file basename, but different directories.
> 
> I think you better assume the source location is always the same. You might
> consider if you actually want to display individual locations at all --
> unless the user is in position to do something with address, that information
> is of no use.
> 
> - Volodya

Thanks, that makes things a bit simpler.  We do need to parse and record
the information for each location, because DDD displays a "glyph" to
indicate the breakpoint location in the machine code display window.
But at least it seems we can make do with only one glyph for the source
code window.

(I suppose I can imagine cases in which the user might want to
enable/disable the individual locations separately, but that seems to be
a rather obscure case).

Peter

> 
> 


  reply	other threads:[~2009-02-14 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-14  9:29 Peter Wainwright
2009-02-14 10:22 ` Vladimir Prus
2009-02-14 12:03   ` Peter Wainwright [this message]
2009-02-14 16:08   ` Daniel Jacobowitz
2009-02-14 16:39     ` Pierre Muller
2009-02-14 16:43     ` Vladimir Prus

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=1234612972.15489.3.camel@ceiriog.eclipse.co.uk \
    --to=peter.wainwright@ieee.org \
    --cc=gdb@sources.redhat.com \
    --cc=vladimir@codesourcery.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