[rfc] [05/05] Get rid of current_gdbarch in xtensa

Markus Deuling deuling@de.ibm.com
Wed Nov 7 11:13:00 GMT 2007


Hi,

this patch removes another bunch of current_gdbarch's in xtensa port.

There was the AREG_NUMBER macro which is very complicated and hard to understand. I replaced
this one by a function which is equivalent (proven by a little test programm). 

I'd really like to see a testsuite run on xtensa with this patch but I don't have access to such a machine.
Maybe anyone of you has and is willing to test the patch? This would be great.

Furthermore this patch add gdbarch to some of the macros and replaces current_gdbarch with it.

Tested by building with --target=xtensa. Ok to commit?


ChangeLog:

	* xtensa-tdep.c (ARG_1ST): Replace ARGS_FIRST_REG by its expression.
	(ARGS_FIRST_REG): Remove.
	(areg_numer): New function.
	(xtensa_pseudo_register_read, xtensa_frame_prev_register)
	(xtensa_extract_return_value, xtensa_store_return_value)
	(xtensa_frame_cache): Replace AREG_NUMBER by areg_number.
	(AREG_NUMBER): Remove.
	(XTENSA_IS_ENTRY, ARG_NOF, ARG_1ST): Add gdbarch as parameter.
	(xtensa_frame_cache): Update use of XTENSA_IS_ENTRY.
	(xtensa_push_dummy_call): Update use of ARG_NOF.
	(extract_call_winsize): Add gdbarch as parameter. Replace
	current_gdbarch by gdbarch.
	(xtensa_extract_return_value, xtensa_store_return_value): Update call
	of extract_call_winsize.



-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff-xtensa
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071107/e9e6731d/attachment.ksh>


More information about the Gdb-patches mailing list