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: [rfc] Add builtin_type_floatformat_*, better handle FP registers?


Given MarkK's comments, an additional comment here is probably relevant 
- he's questions prompted me to review the motivation behind my changes:


> As discussed some time ago, one part of the change is more clearly
> separating cooked(frame) and raw(regcache) register values/types.
> That in turn means eliminating any remaining excuse to hang onto
> macros such as the REGISTER_CONVERT*() macros.  Since one of the must
> common uses of REGISTER_CONVERT*() is converting floating-point
> registers to/from a raw and fudged type, we finally get to the change
> below.  As an additional note this should also make it easier to fix
> problems such as the non-portable floating point mess I recently (re?)
> discovered in arm-tdep.c.


The main thing I'm trying to change is how the current GDB tells lies 
when asked for a register value.  See value_of_register() where a 
conversion occures which should be unnecessary.  value_of_register() 
should return the true value of the register (for the selected frame) 
and that registers true type.  This affects how GUI's are able to 
display a given frame's registers and how the CLI's info-registers works.

Separate to this is value_from_register() which tries to handle the 
problem of a variable being packed into one or more registers  vis:

	o	a struct being scattered across
		several registers

	o	a register value needing to be
		cast to a different type

The change also helps the second or these but does little for the first.

	Andrew


PS: With regard to the first, value_from_register() is struggling, 
modern ABI's like to scatter structs across both FP and integer 
registers and the current code does not handle that.


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