This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

for help on restore command of gdb


Dear Mr:
I use the restore command of gdb to copy a binay file into RAM memory, but there are always some bytes different between the restored memory and the raw binay file.
I am using the gdb 6.0 for powerpc-eabi target to debug a phyCORE-mpc555 board through BDM port. To flash the code into flash memory, I have to download the code into ram buffer first. First I use the powerpc-eabi-objcopy utility to make a binary file (named image) of my object file and then use the gdb command "restore" to copy the file image into RAM buffer.The command I used to make file image is as following, .loader is the section for flash erasing and programing functions, my-obj-file is the object file produced by linker:
powerpc-eabi-objcopy -S -R .loader -O binary my-obj-file image In the gdb init file, I used the command "restore image binary 0xc20000"(0xc20000 is the start address of the ram buffer) to load the file into ram buffer. After the ram buffer programed into flash memory, some times it runs right, some times it goes wrong. To find out where the problem lies, I use the "dump" command of gdb to dump the contents of RAM buffer and compare with file image, I find that there are up to 31 bytes different. How can I fix the problem now ? I will appreciate very much if some body here can help me.


_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]