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

Re: [PATCH]: memory region attributes


>>>>> "Michael" == Michael Snyder <msnyder@cygnus.com> writes:
>> Is there any reason why rw_common() doesn't call target_xfer_memory()?

Michael> Yep.  Infinite recursion.  Target_xfer_memory calls thread_db
Michael> functions which call rw_common.  I know, it's very tempting.
Michael> I found this out the hard way.  ;-)

>> If I'm reading the code correctly, rw_common replicates a lot of what
>> is in sol_thread_xfer_memory().  If it called target_xfer_memory() it
>> would support the dcache and memory attributes without any special
>> accomidations and without significant overhead.

Michael> See above.

So what breaks the cycle?  Both sol_thread_xfer_memory() and basically do:

 if (target_has_execution)
    retval = procfs_ops.to_xfer_memory (memaddr, myaddr, len,
                                        dowrite, attrib, target);
  else
    retval = orig_core_ops.to_xfer_memory (memaddr, myaddr, len,
                                           dowrite, attrib, target);

So if there is recursion with target_xfer_memory(), I don't understand
how it is avoided without it.  If I get some time tomorrow I'll try to
see it myself.

Michael> So -- if we really need this memory region attribute (I haven't been
Michael> following the discussion too closely), we can possibly include it in
Michael> the ps_prochandle_t struct.  But I wonder -- do we really need it?
Michael> Are memory region attributes meaningful on native solaris?
>> 
>> It is true that native systems don't get much out of the current set
>> of attributes, but I don't want to preclude someone adding attributes
>> that might be useful on native platforms.  As such, I think it's best
>> to get the attribute infrastructure solid on all platforms up front.

Michael> Then you have to design the attribute infrastructure so as not to
Michael> break existing targets.  ;-(

It's been on the table so long, I hoped that all issues would have
been worked out.  Guess I needed to get it to this point just to find
the raw edges.

        --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]