-
-
Use Compiler option {debug_info,Key}, see
+
Use Compiler option {debug_info_key,Key}, see
compile(3)
and function
crypto_key_fun/1
@@ -198,18 +197,40 @@ io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
- "Abst" | "Attr" | "CInf" | "ExpT" | "ImpT" | "LocT" | "Atom"
+ "Attr" | "CInf" | "Dbgi" | "ExpT" | "ImpT" | "LocT" | "AtU8"
+
+
+
+ The format stored in the debug_info chunk.
+ To retrieve particular code representation from the backend,
+ Backend:debug_info(Format, Module, Data, Opts) must be
+ invoked. Format is an atom, such as erlang_v1 for
+ the Erlang Abstract Format or core_v1 for Core Erlang.
+ Module is the module represented by the beam file and
+ Data is the value stored in the debug info chunk.
+ Opts is any list of values supported by the Backend.
+ Backend:debug_info/4 must return {ok, Code} or
+ {error, Term}.
+
+ Developers must always invoke the debug_info/4 function
+ and never rely on the Data stored in the debug_info
+ chunk, as it is opaque and may change at any moment. no_debug_info
+ means that chunk "Dbgi" is present, but empty.
+
+
It is not checked that the forms conform to the abstract format
indicated by AbstVersion. no_abstract_code
means that chunk "Abst" is present, but empty.
+ For modules compiled with OTP 20 onwards, the abst_code chunk
+ is automatically computed from the debug_info chunk.
@@ -346,7 +367,7 @@ io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
Registers an unary fun
that is called if beam_lib must read an
- abstract_code chunk that has been encrypted. The fun
+ debug_info chunk that has been encrypted. The fun
is held in a process that is started by the function.
If a fun is already registered when attempting to
register a fun, {error, exists} is returned.
@@ -443,7 +464,8 @@ CryptoKeyFun(clear) -> term()
Removes all chunks from a BEAM
file except those needed by the loader. In particular,
- the debug information (chunk abstract_code) is removed.
+ the debug information (chunk debug_info and abstract_code)
+ is removed.
@@ -454,9 +476,9 @@ CryptoKeyFun(clear) -> term()
Removes all chunks except
those needed by the loader from BEAM files. In particular,
- the debug information (chunk abstract_code) is removed.
- The returned list contains one element for each specified filename,
- in the same order as in Files.
+ the debug information (chunk debug_info and abstract_code)
+ is removed. The returned list contains one element for each
+ specified filename, in the same order as in Files.
--
cgit v1.2.3