Erlang 为什么dbg不能捕获某些函数调用?

Erlang 为什么dbg不能捕获某些函数调用?,erlang,Erlang,以下是一些dbg日志: hdr(Op, Short=[_], O0, O1, O2) -> case lists:member(Short, ?LONG) of true -> hdr(Op, long(Short), O0, O1, O2); false -> case {Op, is_binary(O1)} of {decode, true} -> hdr_dec(Short, O0

以下是一些dbg日志:

hdr(Op, Short=[_], O0, O1, O2) -> 
    case lists:member(Short, ?LONG) of
        true  -> hdr(Op, long(Short), O0, O1, O2);
        false -> case {Op, is_binary(O1)} of
                     {decode, true} -> hdr_dec(Short, O0, O1, O2);
                     _              -> hdr1(Op, Short, O1, O2)
                 end
    end;
从dbg日志中,我们知道
sip_decode:keyN
skip_LWS(Bin1)
都是执行的,所以我认为
catch DecodeFun(decode,Key,undefined,Line,Msg)
应该执行,结果匹配
{Msg1=\sip_Msg{},Bin1}


但是从dbg日志中,我找不到调用
DecodeFun
,它是
hdr/5

dbg
从字面上匹配函数,而DecodeFun是
fun
类型,不是真正的函数。我不知道如何跟踪fun,您可以尝试
dbg:p(Pid,[all])。
dbg
从字面上匹配函数,而DecodeFun属于
fun
类型,不是真正的函数。我不知道如何跟踪funs,您可以尝试
dbg:p(Pid,[all])。
hdr(Op, Short=[_], O0, O1, O2) -> 
    case lists:member(Short, ?LONG) of
        true  -> hdr(Op, long(Short), O0, O1, O2);
        false -> case {Op, is_binary(O1)} of
                     {decode, true} -> hdr_dec(Short, O0, O1, O2);
                     _              -> hdr1(Op, Short, O1, O2)
                 end
    end;
(<0.4158.10>) call sip_decode:keyN("history-info")
(<0.4158.10>) returned from sip_decode:keyN/1 -> 1
(<0.4158.10>) call sip_decode:skip_LWS(<<"\r\n">>)
(<0.4158.10>) returned from sip_decode:skip_LWS/1 -> <<"\r\n">>
dbg:stop_clear().
dbg:tracer().
dbg:p(all,c).
dbg:tpl(sip_decode,'_',[{'_',[],[{return_trace}]}]).