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: Displaying more than 16 registers with GDB for ARM targets


> 	My main issue is that I didn't want to change the
> 	current ARM arch of GDB, rather I wanted to keep as much
> 	of it the same as I could but allow it to be extended to
> 	handle the the extra registers I have.
> 
> 	So it sounds like, I have to hack into the current ARM arch
> 	to make it support my extra registers, this would mean that
> 	they would be displayed for all ARM targets. Even if the
> 	target does not support them.
> 
> 	Or..
> 
> 	Create a completely new architecture that is based 99% on the
> 	ARM, but has my extra register support.
> 
> 	Am I missing something, or does that about sum it up?

A single GDB executable is capable of handling multiple architectures.

I can think of several ways of extending arm-tdep.c to support the extra 
registers.  Off hand:

	- add a command to ``enable'' the registers

	- have that command force an architecture change by calling 
gdbarch_update_p().

	- this will force a call to arm_gdbarch_init()

	- that function is then free to re-layout the register cache the way you 
want.

Andrew


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