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

target_xfer_memory()


I'm changing target_xfer_memory() to support memory region attributes.
While poking around, I came up with a few of questions:

* target_xfer_memory takes a bfd_section argument, which it assigns to
  the global variable target_memory_bfd_section.  The only place it is
  used is within a #if 0'd section of code.  There is a comment above
  its definition in target.c:

        /* This variable is used to pass section information down to
           targets.  This *should* be done by adding an argument to
           the target_xfer_memory function of all the targets, but I
           didn't feel like changing 50+ files.  */

  Does anyone know the history and/or future of this?  I'm going to
  add a memory attribute pointer to the target_xfer_function of all
  the targets anyway, so it would not be difficult to add a section
  pointer at the same time.  On the other hand, if it's one of GDBs
  dead ends, I can remove it (and target_xfert_memory's section
  pointer argument) as well.

* how much does using current_target.to_xfer_memory win over going
  through the target stack?  When I added the code to break up a
  transfer into region-sized chunks, handling the special case for
  current_target became a bit more complicated.

Thanks,

        --jtc

-- 
J.T. Conklin
RedBack Networks

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