Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-04-2009, 01:18 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
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.
Old 08-06-2009, 05:40 PM   #2
LQ Newbie
Registered: Aug 2007
Posts: 7

Rep: Reputation: 1
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading .jpeg / .gif / or any image file in C in Linux amroz Linux - Newbie 1 06-03-2008 11:33 AM
gdb error "Failed to read a valid object file image from memory." Fejimush Programming 0 03-11-2007 02:40 PM
Linux kernel panic -I/O error reading memory image Jorek Linux - Newbie 25 02-09-2007 07:06 AM
Kernel - panic -I/O error reading memory image Bamboocha Linux - Newbie 1 09-02-2006 02:47 PM
Problem reading floppy after writing boot image. QtCoder Linux - General 1 10-01-2003 08:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration