This is the mail archive of the gdb-patches@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: [5/5] reimplement 'set print vtbl on'


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro>     $1 = {
Pedro>       <interface> = {
Pedro>         _vptr.interface = 0x4008c0 <vtable for Obj+32>
Pedro>       }, <No data fields>}

Pedro> which we could claim isn't that much that it justifies a need to
Pedro> toggle a switch, IMO.  We could consider making that
Pedro> unconditional?

Yeah, I think I will do that.

I can leave the old code around on the off chance it is useful to
somebody with GCC 2.95.  I'm not sure this is really worthwhile, but it
does have the virtue of making the patch more obviously ok.

Pedro> Would it be hard to make "set print vtbl on" do with newer binaries what
Pedro> it supposedly does with older compiler built binaries, given the code
Pedro> you've written for "info vtable"?

I think it is doable.  I will look at it.

I considered having a way to construct the proper type for a class'
vtable.  But this could introduce some type lifetime issues and also did
not seem incredibly useful.

Pedro> OTOH, syntax for doing the equivalent of "print
Pedro> o->_vptr.interface[0]", or "call o->_vptr.interface.do_print()"
Pedro> would be (perhaps more) interesting.

I think our plan is to just use ordinary C++ syntax for that.  This
should mostly work, though there are a couple PRs open for a couple
cases.

Tom


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