debugger bug?
Raimo Niskanen
raimo@REDACTED
Fri Oct 22 08:50:22 CEST 2004
Yes, it is a known issue.
We did not have the time to fix the debugger to handle
try-of-catch-after-end. It will be fixed in R10B-1 or -2.
serge@REDACTED (Serge Aleynikov) writes:
> I am not sure if this is a known issue, but the debugger application
> in v5.4 R10B-0 release doesn't seem to understand the new
> try/catch/after clause. If you start the debugger, and try to
> interpret attached "parse.erl" file it fails with an error, yet,
> "parse_ok.erl" is being interpreted normally:
>
> ~/tmp>erl
> Erlang (BEAM) emulator version 5.4 [source] [hipe]
>
> Eshell V5.4 (abort with ^G)
> 1> os:type().
> {unix,linux}
> 2> c(parse, [debug_info]).
> {ok,parse}
> 3> debugger:start().
> {ok,<0.39.0>}
> {'try',7,
> [{call,8,{atom,8,process},[{var,8,'F'}]}],
> [],
> [],
> [{call,10,{remote,10,{atom,10,file},{atom,10,close}},[{var,10,'F'}]}]}
> 4>
> =ERROR REPORT==== 20-Oct-2004::10:31:23 ===
> ** Generic server dbg_iserver terminating
> ** Last message in was {load,parse,
> "/home/serge/tmp/parse.erl",
> <<131,104,5,100,...>>}
> ** When Server state == {state,21,[],[],false,all,[<0.39.0>]}
> ** Reason for termination ==
> ** {{badmatch,{dbg_iload,{unknown_expr,
> {'try',7,
> [{call,8,{atom,8,process},[{var,8,'F'}]}],
> [],
> [],
> [{call,
> 10,
> {remote,
> 10,
> {atom,10,file},
> {atom,10,close}},
> [{var,10,'F'}]}]}}}},
> [{dbg_iserver,handle_call,3},
> {gen_server,handle_msg,6},
> {proc_lib,init_p,5}]}
>
> 4> c(parse_ok, [debug_info]).
> {ok,parse_ok}
> 5>
>
> ---
> Regards,
>
> Serge
> -module(parse).
>
> -export([parse/1]).
>
> parse(FileName) ->
> {ok, F} = file:open(FileName, [read]),
> try
> process(F)
> after
> file:close(F)
> end.
>
> process(F) ->
> process(F, io:get_line(F, '')).
>
> process(_F, eof) ->
> ok;
> process(F, Line) ->
> Tokens = string:tokens(Line, "|"),
> io:format("~p", [Tokens]),
> process(F, io:get_line(F, '')).
>
> -module(parse_ok).
>
> -export([parse/1]).
>
> parse(FileName) ->
> {ok, F} = file:open(FileName, [read]),
> process(F),
> file:close(F).
>
> process(F) ->
> process(F, io:get_line(F, '')).
>
> process(_F, eof) ->
> ok;
> process(F, Line) ->
> Tokens = string:tokens(Line, "|"),
> io:format("~p", [Tokens]),
> process(F, io:get_line(F, '')).
>
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list