This is the mail archive of the gdb-prs@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]

[Bug python/13363] gdb crash when I try to print a std::queue inpython pretty printer


http://sourceware.org/bugzilla/show_bug.cgi?id=13363

--- Comment #6 from Phil Muldoon <pmuldoon at redhat dot com> 2011-11-01 08:30:46 UTC ---
If you look at the commit for that function, all it adds is an exception
handler for GDB exceptions.  Because the function reaches:

type = typy_lookup_typename (type_name, block);

Below the exception handler, then no exceptions have been generated in the
preceding function calls in the exception handler block.  This means that all
of the above functions succeeded without generating an exception.  So when it
reaches the lookup_typename, then it has already passed any/all of the changes
in that commit.

So if we look at the commit here:

http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.26&r2=1.27

You will see that that if the demangle type matches any case in the switch
statement, then the function will exit with a return type of some kind before
it gets to to crashing line.  So it is not exiting, but continuing on to:

type_name = cp_comp_to_string (demangled, 10);

This is obviously failing as the next call has type_name as NULL.   This call
is the same as before the commit, except now it is in the exception handling
block which should have no effect on the outcome of that call.

But this does not help us solve the problem in your case as I cannot reproduce
the error on Linux.  If you feel up to it, you can step into cp_comp_to_string
from your GDB in GDB session and see what is going on.  I would especially be
interested of the contents on demangled.  The resultant call in
cp_comp_to_string is the libiberty function cp_demangle_print.  I doubt there
is much interest there.  I am hoping the demangled contents will give us a
clue.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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