[okl4-developer] debug symbols
Josh Matthews
jmatthews at ok-labs.com
Mon Apr 28 14:14:50 EST 2008
Hi Gabi,
Still looking at your second question, but thought I'd drop you a quick line
regarding your first:
> 1. Is there a flag I can pass to the build system in OKL4 2.1 so that I
> get the C source code in the elf image (as debug information), in a form
> compatible with arm-linux-objdump?
image.elf (in build/images/image.elf) has been "elfweaved": the individual
binaries for each program have been combined into a single image. The method
used to debug an elfweaved image is as follows:
1) Run readelf -a on build/images/image.elf. This will give you a listing of
sections in the image. From that listing, using the address and size
columns, determine the section in which your faulting address lies.
2) The sections will be named {program}.{segment}. For example, vtimer.data.
Using the program name of your located section (in our example, vtimer),
find the original pre-weaved binary corresponding to that program. The
binaries are located in build/{scons-build-environment-name}/bin. There are
generally only 3 SCons build environments: pistachio (the kernel),
iguana_server (the root server), and iguana (everything else). Hence, if the
program name is "kernel", look in build/pistachio/bin, if "ig_server", look
in build/iguana_server/bin, and anything else, try build/iguana/bin.
Once the binary has been located, you can then just run objdump on it.
Best regards,
Josh Matthews
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080428/05813343/attachment.htm
More information about the Developer
mailing list