guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile and GDB


From: Ludovic Courtès
Subject: Re: Guile and GDB
Date: Sat, 27 Jun 2009 00:09:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

Hello,

Neil Jerram <address@hidden> writes:

>> Neil Jerram <address@hidden> writes:
>>
>>> Wow, that's pretty cool!  So your patches are actually in GDB now, are
>>> they?
>>
>> Yes, but as I said, they're not too useful as it stands.
>
> I don't really understand why you say that.  They look useful to me.

Because one can achieve the same result with simple GDB macros such as
those attached below (actually Andy put similar macros in the
repository).  One expects much more from a debugger, most notably being
able to analyze data without running code in the inferior process.

Thanks,
Ludo'.

--8<---------------cut here---------------start------------->8---
# GNU Guile debugging macros.

set $SCM_BOOL_F      = 0x004
set $SCM_BOOL_T      = 0x104
set $SCM_UNDEFINED   = 0x204
set $SCM_EOF_VAL     = 0x304
set $SCM_EOL         = 0x404
set $SCM_UNSPECIFIED = 0x504

define guile-backtrace
  call scm_make_stack ($SCM_BOOL_T, $SCM_EOL)
  call scm_stack_length ($)
  call scm_current_output_port ()
  call scm_display_backtrace_with_highlights ($$2, \
           $, \
           $SCM_BOOL_F, $$, \
           $SCM_UNDEFINED)
end
document guile-backtrace
Show a Guile Scheme-level stack.
end

define guile-print
  if $argc == 1
    call scm_current_output_port ()
    call scm_write ($arg0, $)
  end
end
document guile-print
Print the value of an `SCM' object.
end

define guile-ref
  if $argc == 1
    call scm_c_lookup ($arg0)
  end
end
document guile-ref
Return the value of the given binding.
end

define guile-pre-installation
  set environment LD_LIBRARY_PATH 
/home/ludo/src/guile/libguile/.libs:/home/ludo/src/guile/srfi/.libs
  set environment GUILE_LOAD_PATH /home/ludo/src/guile
end
document guile-pre-installation
Setup the right environment for a pre-installation Guile.
end
--8<---------------cut here---------------end--------------->8---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]