This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [00/16] Get rid of current gdbarch
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: deuling at de dot ibm dot com (Markus Deuling), gdb-patches at sourceware dot org (GDB Patches), eliz at gnu dot org (Eli Zaretskii), brobecker at adacore dot com (Joel Brobecker), jimb at codesourcery dot com (Jim Blandy), rearnsha at arm dot com, mark dot kettenis at xs4all dot nl (Mark Kettenis)
- Date: Tue, 9 Oct 2007 21:59:39 +0200 (CEST)
- Subject: Re: [rfc] [00/16] Get rid of current gdbarch
Daniel Jacobowitz wrote:
> On Mon, Oct 08, 2007 at 04:01:36PM +0200, Ulrich Weigand wrote:
> > Agreed for that particular usage. In general, the reg_to_regnum
> > routines should probably still be converted to "m" -- e.g. the
> > rs6000 versions do make non-trivial use of the gdbarch ...
>
> Isn't that problematic? We do not know what the architecture will
> be at this point. Only the bits common to all architectures using
> the same init routine are safe to use.
Hmm, good point, I'll have to think about this ...
> As for the rs6000 version, the patches I posted last week allow a
> followup patch which propogates some constants. Most of the values
> being read from the tdep are now constants. Some (e.g. ppc_mq_regnum)
> are not constants, but have either a single constant value or -1 if
> the register is not present; for those the constant is appropriate
> in the reg_to_regnum routines anyway.
I agree that everything would be much easier if the register numbers
were constants. But note that rs6000 is not the only platform where
this is not the case, I see the same (or even worse) also in mips,
m32c, xtensa, ... (The mep usage also seems suspicious.)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com