Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: breakpoints in C++ constructors
Date: Thu, 16 Sep 2004 19:17:00 -0000	[thread overview]
Message-ID: <vt2hdpyowh5.fsf@zenia.home> (raw)
In-Reply-To: <16711.34668.469973.591378@gargle.gargle.HOWL>


There are some simpler problems whose solution would make supporting
C++ constructors a bit easier.

For example, what if we first tried to get this case working:


foo.c:

#include <stdio.h>

int
f1 (int x)
{
#include <body.h>        
}

int
f2 (int x)
{
#include <body.h>
}

int
main (int argc, char *argv)
{
  printf ("%d\n", f2 (f1 (1)));
}


body.h:
return x * 2;


Setting a breakpoint at body.h:1 ought to result in breakpoint hits in
f1 and f2.  Making this work requires addressing:

- symtab issues: decode_all_digits needs to return all the locations.
  etc. 

- user interface issues: How do we list breakpoints with multiple
  address?  How do they appear in MI?

- mechanism issues: we have to get breakpoint insertion and removal
  right.  If the breakpoint is conditional, we need separate parsed
  versions of the condition for each location, since each location's
  expression is (potentially) being evaluated in a different block.
  etc. 

I think getting this working would make breakpoints by source location
in constructors work: it's the same source location appearing in more
than one physical function.


  reply	other threads:[~2004-09-16 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-14 16:07 Jim Blandy
2004-09-14 16:15 ` Daniel Jacobowitz
2004-09-14 19:16 ` Andrew Cagney
2004-09-15  0:06   ` Paul Koning
2004-09-16 19:17     ` Jim Blandy [this message]
2004-09-14 19:38 ` Paul Gilliam

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=vt2hdpyowh5.fsf@zenia.home \
    --to=jimb@redhat.com \
    --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