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: Problem calling functions within gdb (version 7.5)


On 04/25/2013 08:45 AM, Saurabh T wrote:
Thank you. This was introduced in 7.2 with support for ADL. Looks like a
bug in types_equal, which doesn't account for cv qualifiers.

It was introduced in 7.3. 7.2 works.

Yes, sorry. My bad.

What is "show check type"? If that is enabled/non-zero, gdb will not
allow this conversion. If you disable it ("set check type 0"), it should
work:

(gdb) p fn2(0x7fffffffde14)
Cannot resolve function fn2 to any overloaded instance
(gdb) set check type 0

This does not work. show check type takes off/on; 0 gives an
error to me. Neither off nor on print the value. Note that you need to
compile with g++. Thanks. 		 	   		

I am using your example program with G++ 4.7.2 (Fedora 18 system compiler).

Ah, I think I may see the problem. This was fixed /after/ the 7.5 branch was created, so it doesn't actually appear in an official release yet. I use CVS HEAD, so I have that patch in my sources.

In that patch, we re-purpose the existing command "set/show check type", and that is probably why it does nothing for you (because until now, it never did do anything).

If you grep for "strict" in gdbtypes.c, do you get anything? If not, your sources do not contain the patch from c++/13356 (http://sourceware.org/bugzilla/show_bug.cgi?id=13356).

The easiest way to get the patch is to use the git mirror and use commit e8370ca5. Or I can send it to you privately.

Keith


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