xref

Joe Armstrong joe@REDACTED
Fri Apr 26 16:21:00 CEST 2002


 Does anybody know anything about xref???

 I want to do a very simple thing.

 Load kernel and stdlib into xref and ask for a listing of all calls
to a particular {Mode,Func,Arity}

 I *thought* that this should be simple.

 Step one: loading the code ... I tryed

 go() ->
    {ok, P} = xref:start(a),
    add_libs(P, libs()),
    xref:stop(P).

 add_libs(P, L) ->
    foreach(fun(I) ->
		    Dir = code:lib_dir(stdlib) ++ "/ebin",
		    io:format("adding:~p~n", [Dir]),
		    X = xref:add_directory(P, Dir, [{verbose,true}]),    
		    io:format("X=~p~n", [X])
	    end, L).

 libs() ->
    [stdlib, kernel].

This produces the following error:

beam_lib: 1 unresolved call
X={error,xref_base,
   {module_clash,
    {beam_lib,
      "/home/joe/installed/otp_src_R8B-0/lib/stdlib/ebin/beam_lib.beam",
      "/home/joe/installed/otp_src_R8B-0/lib/stdlib/ebin/beam_lib.beam"}}}

   The manual page does not document the meaning of this error.

   *what does this error mean* 

   /Joe




   


   




More information about the erlang-questions mailing list