This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Breakpoint menus with overloaded constructors


 > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]