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: [rfa/ppc/branch too] Fix PowerPC/Linux cores


On Mon, Jul 30, 2001 at 05:49:34PM -0700, Kevin Buettner wrote:
> If you look in gregset.h, you'll see that gdb_gregset_t is typedef'd
> to be gregset_t and gdb_fpregset_t is typedef'd to be fpregset_t
> unless GDB_GREGSET_T / GDB_FPREGSET_T are defined in which case
> these'll override the default values.
> 
> So all targets which *don't* define GDB_GREGSET_T / GDB_FPREGSET_T
> won't be affected.  I.e, that means that we only need to worry about
> those ports which *do* define GDB_*REGSET_T.  That means that
> we have to consider Linux (all architectures), NetBSD/sparc,
> Solaris/sparc and AIX/IA-64.
> 
> For Linux, using gdb_*regset_t in fetch_core_registers() will do the
> right thing because we really want to use elf_*regset_t.  (Note,
> however, that Linux/i386 isn't affected because it has its own
> fetch_core_registers function.)
> 
> Neither NetBSD/sparc nor Solaris/sparc use core-regset.c, so we don't
> have to worry about them.
> 
> Finally, AIX/IA-64 is a work in progress (and I'm working on it).
> I'll make whatever adjustments are necessary...

> I have no objection to it going on the branch; but I'd prefer to not
> see it go in on the trunk.  OTOH, I'd have no objection to a patch
> which updates core-regset.c to use gdb_gregset_t / gdb_fpregset_t
> being applied to either the 5.1 release branch or the trunk.  I'm
> not quibbling about correctness, but I'd prefer to see it done the
> "right" way on the trunk.  That could mean using gdb_*regset_t in
> core-regset.c or it could mean using your upcoming cross platform
> corefile support or perhaps some combination.
> 
> Before you commit anything along these lines (or along the lines of
> the patch that you submitted), do check with Andrew first.  I'm not
> the core-regset.c maintainer and Andrew may want to see all patches
> that go in on the release branch go in on the trunk as well...

OK.  In that case, I think the right thing to do would be:
  - remove the #ifdefs
  - change to the gdb_*regset_t functions
On both branch and trunk.  I thought more platforms had custom
GDB_GREGSET_T definitions, but I guess not.

It's closer to overall right, and it will still go away in a reasonable
amount of time.  I'd rather not diverge the branch and truck if I don't
have to.

Andrew, how's that sound?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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