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