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: How to call operator<< functions?


Daniel Jacobowitz wrote:
On Wed, Aug 30, 2006 at 11:05:43PM +0300, Michael Veksler wrote:
Let's look at one thing at a time.


The first two crashes should, I think, be addressed by this patch. Could you try it?
With the patch it works:

   (gdb) p x.Print(myCout)
   Enter B::Print() this=0xbfffec00
   $1 = void
   (gdb) p ref_x.Print(myCout)
   Enter B::Print() this=0xbfffec00
   $2 = void

Great progress. The most annoying and common failures I have used to be seeing is no more.
The other annoying issues sorted by decreasing annoyance :
- this->Print is not always found (I'll try to create a small test-case later).
- std::cout related crashes
- print myCout << x --- won't work need to resort to
print 'operator<<........'(myCout, x)


Some of the later crashes are caused by this:

(gdb) set $a = x.Print
(gdb) p $a
$7 = <error reading variable>

I have a whole lot of patches related to member functions, that I
haven't had time to merge yet - and I would not like to look at this
until I've done that.

This is less critical since this was an attempt to overcome the other bug.


Thanks,


Michael


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