breakpoints from recursive prompts work
authorAndy Wingo <wingo@pobox.com>
Tue, 21 Sep 2010 19:37:11 +0000 (21:37 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 21 Sep 2010 19:37:11 +0000 (21:37 +0200)
commit65bce2375965ab8b563200ff622dd55543ab83fd
tree09a1728199e35cb0177153f217bceeac40e9dbfb
parent194865d2f7df43aec742c7cdd658050bb4caeb94
breakpoints from recursive prompts work

* module/system/vm/traps.scm (new-disabled-trap): Don't manipulate the
  VM trace level in the enable and disable handlers. Unfortunately, this
  makes traps not work unless you enable hooks, but given that
  vm_dispatch_hook has to set trace-level to 0, there needs to be an
  object with a broader view of what traps are enabled. That object is
  the hook state.

* module/system/vm/trap-state.scm (trap-state->trace-level): New
  procedure.
  (with-default-trap-handler): Add an optional trap-state argument. Now
  makes sure that the vm-trace-level is set appropriately during the
  execution of the thunk, allowing for breakpoints from recursive
  prompts.
module/system/vm/trap-state.scm
module/system/vm/traps.scm