[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN
From: |
Evan Hanson |
Subject: |
Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN events |
Date: |
Mon, 7 Mar 2016 16:56:22 +1300 |
On 2016-03-05 13:46, Peter Bex wrote:
> What's exactly the problem you're trying to solve here? I don't see
> anything that messes with "var", so the debugger event should show the
> correct name of the assigned global, no?
The ASSIGN event does, but the ENTRY event of an assigned procedure
doesn't. The let binding changes the "dest" of the value expression, and
that destination is what's used to name the ENTRY event when walking a
lambda, so you end up with an ASSIGN event for "foo" but an ENTRY event
for something like "g6".
> Doesn't this change the semantics by emitting a debug event _before_
> the value is calculated?'
It does. I hadn't considered that too important since I can see the
logic in either ordering, but if the current behaviour is preferred then
I think something as simple as the attached patch ought to be enough,
instead.
Cheers,
Evan
0001-Preserve-destination-name-when-inserting-C_DEBUG_GLO.patch
Description: Text Data
signature.asc
Description: PGP signature