This is the mail archive of the gdb@sourceware.org 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: gdbarch_init, ABI, and registers


Tim Newsome wrote:

> Am I right in that riscv_gdbarch_init() can differentiate these two cases
> based on whether a target description is passed in or not? Eg. if there is
> a target description, register structures need to be set up, and if there
> isn't then that's not necessary?

Yes, exactly.

> The problem I was seeing is that registers were showing up which shouldn't.
> The reason (as I understand it now) is that I was depending on global
> variables in riscv-tdep.c instead of putting them in gdbarch.data. I'll
> make that change, and hopefully then everything will be better.

I see.  Global variables would indeed explain the problem ...


Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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