Beam file format questions.

Eric Merritt cyberlync@REDACTED
Mon Aug 26 19:53:55 CEST 2002


Kostis,

 Thanks guys this really helped me out, I couldn't use
the code directly as I needed it for a java app, but
it did point me in the right direction. 

 One thing that is still up in the air though is the
extra null bytes at the end of the Atom and Code
chunks. For the moment, I am just skiping ahead to the
next non-null bytes, but the fact that these bytes
exist bother me a bit. Could someone explain why they
are there? So far I have seen only one or two bytes.

--- Kostis Sagonas <kostis@REDACTED> wrote:
> Eric Merritt wrote:
> 
>  >  I am attempting to parse the beam files
> generated by
>  > the erlang 8-2 compiler. My purpose here is to
> extract
>  > a list of exported functions from the beam file.
> It is
>  > proving a bit interesting, overall. 
>  > ....
>  >  I figured it should be pretty easy to parse, but
> I
>  > ran into some difficulties. 
> 
> 
> For the purposes of the HiPE compiler, I've written
> a BEAM
> disassembler that is generic and is ever since R8
> included
> in the Erlang/OTP distribution.  It can be used as:
> 
> 	beam_disasm:file(FileName).
> 
> It does exactly what you are looking for, and can be
> a very good
> starting point for reconstructing the Erlang source
> from the BEAM
> file (as requested in some other thread).
> 
> Since I am the author of the "beam_disasm" module,
> please let me
> know if extending its functionality is desirable.
> 
> Cheers,
> Kostis.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the erlang-questions mailing list