aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-05-28 14:37:20 +0300
committerRaimo Niskanen <[email protected]>2010-06-07 14:24:46 +0200
commit5a1b230f3ecb6d8b4f88e6df8fd33e3707f80cd8 (patch)
tree6ebb62c5a876855f8061992324bab5c9ce428607 /lib/debugger
parent707c6510597e5eb6e32b88412edd717e0e3c39ba (diff)
downloadotp-5a1b230f3ecb6d8b4f88e6df8fd33e3707f80cd8.tar.gz
otp-5a1b230f3ecb6d8b4f88e6df8fd33e3707f80cd8.tar.bz2
otp-5a1b230f3ecb6d8b4f88e6df8fd33e3707f80cd8.zip
Remove tid() from the predefined builtin types.
Change erl_lint not to recognize this type as builtin and add a new erl_lint.beam version in bootstrap. Add an -opaque type declaration for this type in ets.erl and also declare this as an exported type. Use this type in file debugger/src/dbg_iload.erl in a spec. While at it, also clean up this later file a bit.
Diffstat (limited to 'lib/debugger')
-rw-r--r--lib/debugger/src/dbg_iload.erl18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/debugger/src/dbg_iload.erl b/lib/debugger/src/dbg_iload.erl
index 1216338006..24167003c3 100644
--- a/lib/debugger/src/dbg_iload.erl
+++ b/lib/debugger/src/dbg_iload.erl
@@ -18,12 +18,8 @@
%%
-module(dbg_iload).
-%% External exports
-export([load_mod/4]).
-%% Internal exports
--export([load_mod1/4]).
-
%%====================================================================
%% External exports
%%====================================================================
@@ -36,29 +32,29 @@
%% Db = ETS identifier
%% Load a new module into the database.
%%
-%% We want the loading of a module to be syncronous so no other
+%% We want the loading of a module to be synchronous so that no other
%% process tries to interpret code in a module not being completely
%% loaded. This is achieved as this function is called from
%% dbg_iserver. We are suspended until the module has been loaded.
%%--------------------------------------------------------------------
+-spec load_mod(Mod, file:filename(), binary(), ets:tid()) ->
+ {'ok', Mod} when is_subtype(Mod, atom()).
+
load_mod(Mod, File, Binary, Db) ->
Flag = process_flag(trap_exit, true),
- Pid = spawn_link(?MODULE, load_mod1, [Mod, File, Binary, Db]),
+ Pid = spawn_link(fun () -> load_mod1(Mod, File, Binary, Db) end),
receive
{'EXIT', Pid, What} ->
process_flag(trap_exit, Flag),
What
end.
-%%====================================================================
-%% Internal exports
-%%====================================================================
+-spec load_mod1(atom(), file:filename(), binary(), ets:tid()) -> no_return().
load_mod1(Mod, File, Binary, Db) ->
store_module(Mod, File, Binary, Db),
exit({ok, Mod}).
-
%%====================================================================
%% Internal functions
%%====================================================================
@@ -84,7 +80,7 @@ store_module(Mod, File, Binary, Db) ->
Attr = store_forms(Forms, Mod, Db, Exp, []),
erase(mod_md5),
erase(current_function),
-% store_funs(Db, Mod),
+ %% store_funs(Db, Mod),
erase(vcount),
erase(funs),
erase(fun_count),