remove heap links in VM frames, incorporate vm frames into normal backtraces
[bpt/guile.git] / gdbinit
diff --git a/gdbinit b/gdbinit
index ad7881f..7c1b216 100644 (file)
--- a/gdbinit
+++ b/gdbinit
@@ -1,7 +1,13 @@
+# -*- GDB-Script -*-
+
 define newline
   call (void)scm_newline (scm_current_error_port ())
 end
 
+define pp
+  call (void)scm_call_1 (scm_variable_ref (scm_c_module_lookup (scm_c_resolve_module ("ice-9 pretty-print"), "pretty-print")), $arg0)
+end
+
 define gdisplay
   call (void)scm_display ($arg0, scm_current_error_port ())
   newline
@@ -140,11 +146,6 @@ define nextframe
   output $vmdl
   newline
   set $vmsp=$vmsp-1
-  sputs "hl:\t"
-  output $vmsp
-  sputs "\t"
-  gwrite *$vmsp
-  set $vmsp=$vmsp-1
   sputs "el:\t"
   output $vmsp
   sputs "\t"
@@ -178,14 +179,13 @@ define nextframe
   gwrite *$vmsp
   set $vmsp=$vmsp-1
   newline
-  if !$vmdl
-    loop_break
+  if $vmdl
+    set $vmfp=$vmdl
+    set $vmbp=(struct scm_program*)(((SCM*)($vmfp[-1]))[1])
+    set $vmstack_base=$vmfp+$vmbp->nargs+$vmbp->nlocs+4
+    set $vmframe=$vmframe+1
+    newline
   end
-  set $vmfp=$vmdl
-  set $vmbp=(struct scm_program*)(((SCM*)($vmfp[-1]))[1])
-  set $vmstack_base=$vmfp+$vmbp->nargs+$vmbp->nlocs+4
-  set $vmframe=$vmframe+1
-  newline
 end
 
 define vmstack
@@ -194,3 +194,7 @@ define vmstack
     nextframe
   end
 end
+
+define inst
+  p scm_instruction_table[$arg0]
+end