Erlang/OTP Forums

Author Message

<  Erlang patches mailing list  ~  dbg_iload:guard_test/1 patch

luke at bluetail.com
Posted: Thu Apr 01, 2004 9:57 am Reply with quote
Guest
Ahoy,

The patch below adds support for two types of guards in the
debugger's Erlang interpreter:

Var
not <Expr>

It just translates them into:

Var == true
<Expr> /= true

These seem to be new features added to Erlang but not this
interpreter.

If you use these guards in your programs and you have seen Distel
blowing up when you interpret your modules, I recommend applying this
in lib/debugger/src/ :-)

P.S., is there any technical reason not to rewrite the Erlang
interpreters in the debugger and/or shell to interpret Core Erlang
instead?



Post generated using Mail2Forum (http://m2f.sourceforge.net)
dgud at erix.ericsson.se
Posted: Thu Apr 01, 2004 10:11 am Reply with quote
Guest
I have already fixed that, along with a long list of other bugs.
It will be available in next erlang release.

Cheers
/Dan

Luke Gorrie writes:
> Ahoy,
>
> The patch below adds support for two types of guards in the
> debugger's Erlang interpreter:
>
> Var
> not <Expr>
>
> It just translates them into:
>
> Var == true
> <Expr> /= true
>
> These seem to be new features added to Erlang but not this
> interpreter.
>
> If you use these guards in your programs and you have seen Distel
> blowing up when you interpret your modules, I recommend applying this
> in lib/debugger/src/ Smile
>
> P.S., is there any technical reason not to rewrite the Erlang
> interpreters in the debugger and/or shell to interpret Core Erlang
> instead?
>
> --- dbg_iload.erl.~1.1.1.5.~ 2003-09-02 15:34:28.000000000 +0200
> +++ dbg_iload.erl 2004-04-01 11:29:01.000000000 +0200
> _at__at_ -243,6 +243,8 _at__at_
> error ->
> {safe_bif,Line,erlang,F,As}
> end;
> +guard_test({op,Line,'not',L0}) ->
> + guard_test({op,Line,'/=',L0,{atom,Line,true}});
> guard_test({op,Line,Op,L0}) ->
> true = erl_internal:arith_op(Op, 1), %Assertion.
> L1 = gexpr(L0),
> _at__at_ -258,7 +260,8 _at__at_
> guard_test({char,_,_}=C) -> C;
> guard_test({float,_,_}=F) -> F;
> guard_test({atom,_,_}=A) -> A;
> -guard_test({nil,_}=N) -> N.
> +guard_test({nil,_}=N) -> N;
> +guard_test({var,Line,_}=V) -> guard_test({op,Line,'==',V,{atom,Line,true}}).
>
> map_guard_bif(integer, 1) -> {ok,is_integer};
> map_guard_bif(float, 1) -> {ok,is_float};

--
Dan Gudmundsson Project: Mnesia, Erlang/OTP
Ericsson Utvecklings AB Phone: +46 8 727 5762
UAB/F/P Mobile: +46 70 519 9469
S-125 25 Stockholm Visit addr: Armborstv 1



Post generated using Mail2Forum (http://m2f.sourceforge.net)
luke at bluetail.com
Posted: Tue Apr 06, 2004 12:23 pm Reply with quote
Guest
Dan Gudmundsson <dgud_at_erix.ericsson.se> writes:

> I have already fixed that, along with a long list of other bugs.
> It will be available in next erlang release.

We're hitting another debugger crash. This time it's a 'badarg' from
the erts_debug:make_fun when called from dbg_ieval:expr. I don't have
the exact backtrace handy, but conspicously the 'Uniq' variable was
bound to 'undefined'.

Does that sound like something you've fixed?

Are there still OTP snapshots stashed in secret hideouts on the web?
I could use one to diff against.

-Luke



Post generated using Mail2Forum (http://m2f.sourceforge.net)
dgud at erix.ericsson.se
Posted: Tue Apr 06, 2004 12:27 pm Reply with quote
Guest
Luke Gorrie writes:
> Dan Gudmundsson <dgud_at_erix.ericsson.se> writes:
>
> > I have already fixed that, along with a long list of other bugs.
> > It will be available in next erlang release.
>
> We're hitting another debugger crash. This time it's a 'badarg' from
> the erts_debug:make_fun when called from dbg_ieval:expr. I don't have
> the exact backtrace handy, but conspicously the 'Uniq' variable was
> bound to 'undefined'.
>
> Does that sound like something you've fixed?

I don't know, I have rewritten how funs are handled,
Probably because the erts_debug:make_fun are never called now.


> Are there still OTP snapshots stashed in secret hideouts on the web?
> I could use one to diff against.

I don't know..

> -Luke
/Dan



Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum