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]

Re: [RFC] Register sets


   Date: Tue, 02 Sep 2003 14:40:28 -0400
   From: Andrew Cagney <ac131313@redhat.com>

   > The read_regset function is necessary to support the `gcore' command.
   > It should use regcache_raw_read to fetch all relevant registers from
   > the running target, such that we don't need target_fetch_registers(-1)
   > first.

   GDB currently has a conflict here.  GCORE should definitly use 
   regcache_raw_read, but that still leaves the ptrace code writing back 
   register values - it uses regcache_collect.  Hmm, perhaphs it two should 
   be using a regcache_raw_read anyway - might even make it possible to 
   eliminate "target_prepare_to_store"?

We've said in the past that we the register cache is a write-through
cache.  Not all of our targets treat it exactly like that, however,
for the ones that do (and all of them really should), it shouldn't
make a difference whether we use regcache_raw_collect or
regcache_raw_read.  If we're storing a single register, that register
must be valid, and therefore won't trigger fetching any registers.  If
we're storing all registers, we must have fetched them all before, and
they should all be valid too.  That said, we should be able to
eliminate regcache_raw_collect in the future.

Mark


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