[okl4-developer] no debugging symbols with gdb
Nelson Tam
nelson at ok-labs.com
Wed Apr 30 00:53:18 EST 2008
Hi Lukas,
On 30/04/2008, at 12:20 AM, Lukas HANEL wrote:
>
> I figured that out on my own, even though I made some detour:
>
> When using the actual binary to boot, I run into problems with the
> Kernel starting at address 0xf0000000. So I used objcopy
> --change-addresses -0xXXXXXXXX to forge the kernel to start in my
> physical memory. That way I was able to run the kernel, but it did not
> finish the startup. As I figured out, the problem arises from a switch
> statement, which was transformed into a series of absolute jumps. As
> these addresses were not changed by objcopy, shortly after such a
> jump,
> the kernel crashed.
>
> I tried then to boot the image.boot and use gdb with the original
> kernel
> binary and that worked.
>
> As the kernel starts on physical addresses gdb could not use the
> standard kernel image. So I use my objcopied binary for the first
> phase
> of kernel startup. Afterwards I add the original kernel image with
> add-symbol-file to gdb. And that way I can continue.
Thanks for sharing that with us. It sounds like a potentially useful
technique that we could use also. Definitely we'll look into it
further and perhaps we can provide better support for gdb-ready ELF
images that are automatically generated during build time.
--
(nt)
Nelson Tam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1560 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20080430/e5c57e53/attachment.bin
More information about the Developer
mailing list