This is the mail archive of the gdb@sourceware.org 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]

Re: Does GDB use VMA addresses when uploading an image to debug in a remote target?


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

 Daniel> I recently encountered this problem in another context, where
 Daniel> the stub did support reflashing; so maybe GDB needs to be
 Daniel> more flexible about it.  I'm not sure.

Yes, that would be useful.  There are other examples for LMA != VMA
where LMA is the correct load address.  For example:

1. LMA is an available memory area, VMA is "low memory", and a bit of
   initialization code moves the loaded code to low memory.  It can't
   be loaded directly there because there is currently running code
   already there, and loading on top of it will crash the system.

2. LMA is an unmapped address, VMA is a mapped address.  The loader
   doesn't know about mapping.  The init code turns on the mapping, at
   which point execution continues via VMA.

We do #2 in our embedded system.  

So this suggests that an option to load at LMA would be useful.  

   paul


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