Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: Breakpoint menus with overloaded constructors
Date: Mon, 07 Jan 2008 21:44:00 -0000	[thread overview]
Message-ID: <18306.40244.667410.885833@kahikatea.snap.net.nz> (raw)
In-Reply-To: <flt9qo$q7k$1@ger.gmane.org>

 > Ok, I have no clue :-(. breakpoint.c calls decode_line_1 with "A::A".
 > It gets to sals back, both are zeroed. This is not something I've ever
 > touched, and I don't know what could be the problem.

If I set breakpoints in the overloaded constructors (AZA::AZA) and similar
overloaded methods (AZA::BZB) I get:

  (gdb) inf break
  Num Type           Disp Enb Address    What
  1   breakpoint     keep y   0x08048890 in AZA at overgdb.cc:12
  2   breakpoint     keep y   0x080488c8 in AZA at overgdb.cc:17
  3   breakpoint     keep y   0x080488f4 in AZA::BZB(int) at overgdb.cc:22
  4   breakpoint     keep y   0x0804892c in AZA::BZB(double) at overgdb.cc:27

which presumably should be:

  (gdb) inf break
  Num Type           Disp Enb Address    What
  1   breakpoint     keep y   0x08048890 in AZA::AZA at overgdb.cc:12
  2   breakpoint     keep y   0x080488c8 in AZA::AZA at overgdb.cc:17
  3   breakpoint     keep y   0x080488f4 in AZA::BZB(int) at overgdb.cc:22
  4   breakpoint     keep y   0x0804892c in AZA::BZB(double) at overgdb.cc:27


So I wonder if GDB is reading the symbol information correctly.

readelf gives me:

 <2><5d00>: Abbrev Number: 53 (DW_TAG_subprogram)
     DW_AT_sibling     : <5d19>	
     DW_AT_external    : 1	
     DW_AT_name        : AZA	
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 15	
     DW_AT_declaration : 1	
 <2><5d19>: Abbrev Number: 54 (DW_TAG_subprogram)
     DW_AT_sibling     : <5d40>	
     DW_AT_external    : 1	
     DW_AT_name        : BZB	
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 20	
     DW_AT_MIPS_linkage_name: _ZN3AZA3BZBEi	
     DW_AT_declaration : 1	

i.e. no linkage for AZA but I'm not sure how GDB links the methods AZA and
BZB to the class AZA.



-- 
Nick                                           http://www.inet.net.nz/~nickrob


  reply	other threads:[~2008-01-07 21:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 21:41 Nick Roberts
2008-01-04 12:53 ` Daniel Jacobowitz
2008-01-04 19:14   ` Vladimir Prus
2008-01-07 13:36     ` Vladimir Prus
2008-01-07 21:44       ` Nick Roberts [this message]
2008-01-07 21:55         ` Daniel Jacobowitz
2008-01-07 23:20         ` Nick Roberts

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=18306.40244.667410.885833@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /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