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 c++/17685] segmentation fault when trying to print a templated type


https://sourceware.org/bugzilla/show_bug.cgi?id=17685

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
(In reply to thomas from comment #0)
> Attached is an example program. Set a breakpoint in main and try to print
> out test (p test). gdb will segfault.

I've tried this on 7.8/HEAD here, and it works. However, there are a number of
possible issues that could be causing your problems.

Are you using python STL pretty-printers? Are they up to date?

The next thing to try is printing after the vector is initialized. If memory
serves, uninitialized STL containers sometimes cause problems for the
pretty-printers. Please add, e.g., a (cough, missing) "return 0;" at the end of
main. Stop on this line and try to print the vector again. What's the result?

Please fill in the host and target bugzilla fields (or provide output of "show
version" in a comment), that would help also narrow the focus of further
investigations.

Finally, if possible, please provide a stack backtrace of the segfault, it
would undoubtedly prove most enlightening.

-- 
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]