erlang and gdb

Per Gustafsson <>
Tue Sep 13 11:28:02 CEST 2005


I had to make sure that the directory containing inet_gethost 
(otp/bin/i686-pc-linux-gnu/) was in my path in order to run gdb. In 
addition to this I write

export ROOTDIR=SuitablePath/otp/
export BINDIR=$ROOTDIR/bin/i686-pc-linux-gnu/
gdb $BINDIR/beam

and in gdb

run -- -root $ROOTDIR

of course the i686-pc-linux-gnu part depends on what machine you are using.

Per 

Bjorn Gustavsson wrote:

>To update the script, you can run
>
>   erl -emu_args
>
>to find out which arguments that are normally passed to 'beam'.
>
>You'll also need to set some environment variable, for instance
>BINDIR. You can look in the 'erl' script to see how they should
>be set.
>
>But if you have a core-file, you just run gdb like this:
>
>gdb <Root of installation>/erts-5.4.9/bin/beam core
>
>/Bjorn
>
>Claes Wikstom <> writes:
>
>  
>
>>I'm getting a SIGSEGV when I start R10B-7 on one of machines.
>>
>>What's the preferred way to run the emulator under gdb these days?
>>I used to use a script that was initially crafted by Tony I think
>>but it's rotted over the years ...
>>
>>
>>/klacke
>>
>>    
>>
>
>  
>




More information about the erlang-questions mailing list