]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Show full Python stack on error
authorTom Tromey <tromey@adacore.com>
Wed, 27 Sep 2023 19:49:59 +0000 (13:49 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 28 Sep 2023 20:55:18 +0000 (14:55 -0600)
This changes the libstdc++ test suite to arrange for gdb to show the
full Python stack if any sort of Python exception occurs.  This makes
debugging the printers a little simpler.

libstdc++-v3/ChangeLog:

* testsuite/lib/gdb-test.exp (gdb-test): Enable Python
stack traces from gdb.

libstdc++-v3/testsuite/lib/gdb-test.exp

index d8e572ef7b3825103c6b99331180d97cbc847b95..af7d970d3887f0c9eba43a1fb2a92a81fa86e4a6 100644 (file)
@@ -141,6 +141,8 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} } {
     puts $fd "set auto-load no"
     # Now that we've disabled auto-load, it's safe to set the target file
     puts $fd "file ./$output_file"
+    # See the full backtrace of any failures.
+    puts $fd "set python print-stack full"
     # Load & register *our* copy of the pretty-printers
     puts $fd "source $printer_code"
     puts $fd "python register_libstdcxx_printers(None)"