diff options
author | Andy Wingo <wingo@pobox.com> | 2008-09-30 22:50:48 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-09-30 22:50:48 +0200 |
commit | 887ce75ae828fabd9a76d8e719bd3070c334eb44 (patch) | |
tree | ac57ad2416a186874d2cfc312ffa4dc029a10864 /gdbinit | |
parent | 999f1b26e74a7a8eb9e9e5e479f971e145aa7326 (diff) |
fix some missed references when calling C functions
* gdbinit: Update to be a bit more useful.
* libguile/vm-i-system.c: Make sure that arguments to C procedures are
visible on the stack so they get marked. Could be a source for the
missed references.
Diffstat (limited to 'gdbinit')
-rw-r--r-- | gdbinit | 142 |
1 files changed, 75 insertions, 67 deletions
@@ -99,90 +99,98 @@ define smobdescriptor p scm_smobs[0xff & (((scm_t_bits)$arg0) >> 8)] end -define vmstack +define vmstackinit set $vmsp=sp set $vmstack_base=stack_base set $vmfp=fp set $vmbp=bp set $vmframe=0 - while $vmsp > vp->stack_base - set $orig_vmsp=$vmsp - while $vmsp > $vmstack_base - output $orig_vmsp - $vmsp - sputs "\t" - output $vmsp - sputs "\t" - gwrite *$vmsp - set $vmsp=$vmsp-1 - end - newline - sputs "Frame " - output $vmframe - newline - sputs "ra:\t" - output $vmsp - sputs "\t" - output (SCM*)*$vmsp - set $vmsp=$vmsp-1 - newline - sputs "mvra:\t" - output $vmsp - sputs "\t" - output (SCM*)*$vmsp - set $vmsp=$vmsp-1 - newline - sputs "dl:\t" - output $vmsp +end + +define nextframe + set $orig_vmsp=$vmsp + while $vmsp > $vmstack_base + output $orig_vmsp - $vmsp sputs "\t" - set $vmdl=(SCM*)(*$vmsp) - output $vmdl - newline - set $vmsp=$vmsp-1 - sputs "hl:\t" output $vmsp sputs "\t" gwrite *$vmsp set $vmsp=$vmsp-1 - sputs "el:\t" + end + newline + sputs "Frame " + output $vmframe + newline + sputs "ra:\t" + output $vmsp + sputs "\t" + output (SCM*)*$vmsp + set $vmsp=$vmsp-1 + newline + sputs "mvra:\t" + output $vmsp + sputs "\t" + output (SCM*)*$vmsp + set $vmsp=$vmsp-1 + newline + sputs "dl:\t" + output $vmsp + sputs "\t" + set $vmdl=(SCM*)(*$vmsp) + 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" + gwrite *$vmsp + set $vmsp=$vmsp-1 + set $vmnlocs=(int)$vmbp->nlocs + while $vmnlocs > 0 + sputs "loc #" + output $vmnlocs + sputs ":\t" output $vmsp sputs "\t" gwrite *$vmsp set $vmsp=$vmsp-1 - set $vmnlocs=(int)$vmbp->nlocs - while $vmnlocs > 0 - sputs "loc #" - output $vmnlocs - sputs ":\t" - output $vmsp - sputs "\t" - gwrite *$vmsp - set $vmsp=$vmsp-1 - set $vmnlocs=$vmnlocs-1 - end - set $vmnargs=(int)$vmbp->nargs - while $vmnargs > 0 - sputs "arg #" - output $vmnargs - sputs ":\t" - output $vmsp - sputs "\t" - gwrite *$vmsp - set $vmsp=$vmsp-1 - set $vmnargs=$vmnargs-1 - end - sputs "prog:\t" + set $vmnlocs=$vmnlocs-1 + end + set $vmnargs=(int)$vmbp->nargs + while $vmnargs > 0 + sputs "arg #" + output $vmnargs + sputs ":\t" output $vmsp sputs "\t" gwrite *$vmsp set $vmsp=$vmsp-1 - newline - if !$vmdl - loop_break - 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 + set $vmnargs=$vmnargs-1 + end + sputs "prog:\t" + output $vmsp + sputs "\t" + gwrite *$vmsp + set $vmsp=$vmsp-1 + newline + if !$vmdl + loop_break + 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 + vmstackinit + while $vmsp > vp->stack_base + nextframe end end |