Fix segv when referencing a value added to history after a Guile garbage collect.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.guile / scm-value.exp
index 89f0ff1d610e3e3cf04e08abf8d7759af7c8c31e..a85d5bda9e48e358da37edfe7432b12b1255d4a4 100644 (file)
@@ -67,6 +67,10 @@ proc test_value_in_inferior {} {
     gdb_test "gu (history-ref i)" "#<gdb:value 42>"
     gdb_test "p \$" "= 42"
 
+    # Verify the recorded history value survives a gc.
+    gdb_test_no_output "guile (gc)"
+    gdb_test "p \$\$" "= 42"
+
     # Test dereferencing the argv pointer.
 
     # Just get inferior variable argv the value history, available to guile.
This page took 0.023564 seconds and 4 git commands to generate.