mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 08:40:19 +02:00
clean up (system vm frames), add locals command to debugger
* libguile/frames.c (scm_init_frames): No need to bootstrap the VM here, it should be already bootstrapped by init.c. (scm_bootstrap_frames): No need to register an extension, as scm_init_frames is called by init.c. * module/system/vm/frame.scm: Don't load the scm_init_frames extension, as the primitives from frames.c are loaded by Guile's init. (frame-bindings): Change to return bindings, as can be accessed by the binding: accessors from program.scm. (frame-lookup-binding): Revive and make this one work with current code. (frame-binding-set!): (frame-binding-ref): Use the new frame-lookup-binding. Perhaps these should handle boxing and unboxing, though. (frame-source): New accessor, returns a source object. (frame-call-representation): Change to return a full list, as truncated-print can truncate for us. (frame-environment, frame-object-binding, frame-object-name): Update not to take an address, as the address is part of the frame. (frame-variable-exists?, frame-variable-ref, frame-variable-set!) (frame-local-variables, frame-program-name, print-frame) (print-frame-chain-as-backtrace, frame-file, frame-line-number) (make-frame-chain, bootstrap-frame?, frame-number, frame-address): Remove these outdated functions. * module/system/vm/debug.scm (debugger-repl): Use frame-call-representation, and ~@y. (locals): New command, prints local variables in a frame.
This commit is contained in:
parent
b8596c08ac
commit
1c5e812258
3 changed files with 56 additions and 159 deletions
|
@ -304,15 +304,11 @@ scm_bootstrap_frames (void)
|
|||
{
|
||||
scm_tc16_frame = scm_make_smob_type ("frame", 0);
|
||||
scm_set_smob_print (scm_tc16_frame, frame_print);
|
||||
scm_c_register_extension ("libguile", "scm_init_frames",
|
||||
(scm_t_extension_init_func)scm_init_frames, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
scm_init_frames (void)
|
||||
{
|
||||
scm_bootstrap_vm ();
|
||||
|
||||
#ifndef SCM_MAGIC_SNARFER
|
||||
#include "libguile/frames.x"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue