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]

constructor breakpoints


Having recently tripped over this (not being able to set breakpoints
on constructors), and having read as much of the sordid history of
this as I can find, I wonder what the current thinking is on how to
fix this.  Has there been any progress?

bash$ ./gdb -nx testsuite/gdb.cp/overload
(gdb) b foo::foo
[0] cancel
[1] all
?HERE
?HERE
?HERE
>

The ?HERE's are because symbol lookup finds the class, not the
constructor.  Being able to specifically ask for the constructor seems
like a reasonable way to go.  This could be done by encoding the
request in the name (looking up c::c), or specifying the class of
object to lookup (e.g. LOC_BLOCK), or rearranging the symbol table
such that one can lookup the class, and then from that lookup (or
iterate) over members that match certain parameters.  [I'm just
throwing out a range of possibilities.]


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