sb-debug:arg doesn't work in TRACE :condition

Bug #1357826 reported by 3b
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

reported by enn in #lisp:

Manual says: ":condition, :break and :print forms are evaluated in a context which mocks up the lexical environment of the called function, so that sb-debug:var and sb-debug:arg can be used. "

(defun foo (a) a)
(trace foo :condition (eql (sb-debug:arg 0) 1))
(foo 0)

=>

debugger invoked on a UNBOUND-VARIABLE in thread
#<THREAD "main thread" RUNNING {10039CE903}>:
  The variable SB-DEBUG::ARG-LIST is unbound.
...
0: ((LAMBDA ()))
1: ((LAMBDA (SB-DEBUG::FRAME) :IN SB-DEBUG::COERCE-FORM) #<unavailable argument>)
2: ((LAMBDA (SB-DEBUG::FRAME SB-DEBUG::BPT &REST SB-DEBUG::ARGS) :IN SB-DEBUG::TRACE-START-BREAKPOINT-FUN) #<SB-DI::COMPILED-FRAME SB-INT:SIMPLE-EVAL-IN-LEXENV> #<unused argument> 0)
3: (SB-DEBUG::TRACE-CALL #<SB-DEBUG::TRACE-INFO FOO> #<FUNCTION FOO> 0)
4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FOO 0) #<NULL-LEXENV>)

on sbcl 1.2.2.79 x8664 linux, but works as expected (traces only when 1 is passed to foo) on 1.1.14.49 x8664 linux and 1.1.13.24 x86 linux

Tags: trace
Revision history for this message
Douglas Katzman (dougk) wrote :
Revision history for this message
Douglas Katzman (dougk) wrote :

Stas fixed this in 0328ec0baa09af3eff647353593236bd50651a3b

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.