LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do you get GDB to offset an image it is reading? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-get-gdb-to-offset-an-image-it-is-reading-745078/)

larusmax 08-04-2009 12:18 PM

How do you get GDB to offset an image it is reading?
 
I have loaded an image into RAM on my target at an offset other than 0x0. When I bring up GDB, it is confused because it has not accounted for this additional offset (which is not listed in the image header). I tried using the "load 0x10000 image" command, but that appears to attempt to reload the file in the target RAM.

I am simply looking for a way to tell GDB to begin at 0x0+N rather than a 0x0.

jvhiii 08-06-2009 04:40 PM

add-symbol-file ?
 
I don't know if this will work, but possibly:

add-symbol-file image 0x10000

Not really the intended usage for add-symbol-file, according to my Debugging with GDB book, but it looks like the only *file command that takes a load address.

-John


All times are GMT -5. The time now is 04:12 AM.