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]

Translate memory addresses


Hi --

I'm working with a target which needs to translate
a virtual memory addresses to a physical address
before accessing the target's memory or the core file.

I added a new field to target_ops to specify the
translation function and added the following to
target_xfer_partial():

  /* Translate address if needed.  */
  if (ops->to_translate_address)
    offset = ops->to_translate_address (ops, offset);

So far, so good.  I can add this to the target definition
for the live targets.  But this doesn't work for core files.

Core_ops is defined in corelow.c, and there doesn't appear
to be an obvious hook for the target code to modify it to
add the translation routine.

Any suggestions on the best way to add a hook or how to specify
a target routine to do address translations for core files?

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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