* [PATCH] Deperectate REG_STRUCT_HAS_ADDR
@ 2003-09-13 14:13 Mark Kettenis
2003-09-13 15:09 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2003-09-13 14:13 UTC (permalink / raw)
To: gdb-patches
No alterbative yet, but that will come soon.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Renamed from
REG_STRUCT_HAS_ADDR.
* gdbarch.c, gdbarch.h: Updated.
* infcall.c (call_function_by_hand): Update.
* stabsread.c (define_symbol): Updated.
Index: doc/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Replace
REG_STRUCT_HAS_ADDR with DEPRECATED_REG_STRUCT_HAS_ADDR.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.267
diff -u -p -r1.267 gdbarch.sh
--- gdbarch.sh 11 Sep 2003 15:17:14 -0000 1.267
+++ gdbarch.sh 13 Sep 2003 14:10:32 -0000
@@ -646,7 +646,7 @@ F:2:FRAME_NUM_ARGS:int:frame_num_args:st
# alignment.
F:2:DEPRECATED_STACK_ALIGN:CORE_ADDR:deprecated_stack_align:CORE_ADDR sp:sp
M:::CORE_ADDR:frame_align:CORE_ADDR address:address
-F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
+F:2:DEPRECATED_REG_STRUCT_HAS_ADDR:int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
v::FRAME_RED_ZONE_SIZE:int:frame_red_zone_size
v:2:PARM_BOUNDARY:int:parm_boundary
#
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.26
diff -u -p -r1.26 infcall.c
--- infcall.c 11 Sep 2003 15:17:15 -0000 1.26
+++ infcall.c 13 Sep 2003 14:10:33 -0000
@@ -664,7 +664,7 @@ You must use a pointer to function type
}
}
- if (REG_STRUCT_HAS_ADDR_P ())
+ if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ())
{
int i;
/* This is a machine like the sparc, where we may need to pass a
@@ -681,7 +681,7 @@ You must use a pointer to function type
|| (TYPE_CODE (arg_type) == TYPE_CODE_FLT
&& TYPE_LENGTH (arg_type) > 8)
)
- && REG_STRUCT_HAS_ADDR (using_gcc, arg_type))
+ && DEPRECATED_REG_STRUCT_HAS_ADDR (using_gcc, arg_type))
{
CORE_ADDR addr;
int len; /* = TYPE_LENGTH (arg_type); */
@@ -760,8 +760,8 @@ You must use a pointer to function type
/* elz: on HPPA no need for this extra alignment, maybe it is needed
on other architectures. This is because all the alignment is
- taken care of in the above code (ifdef REG_STRUCT_HAS_ADDR) and
- in hppa_push_arguments */
+ taken care of in the above code (ifdef DEPRECATED_REG_STRUCT_HAS_ADDR)
+ and in hppa_push_arguments */
/* NOTE: cagney/2003-03-24: The below code is very broken. Given an
odd sized parameter the below will mis-align the stack. As was
suggested back in '96, better to let PUSH_ARGUMENTS handle it. */
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.59
diff -u -p -r1.59 stabsread.c
--- stabsread.c 26 May 2003 19:35:51 -0000 1.59
+++ stabsread.c 13 Sep 2003 14:10:36 -0000
@@ -1752,7 +1752,7 @@ define_symbol (CORE_ADDR valu, char *str
name to represent an argument passed in a register.
GCC uses 'P' for the same case. So if we find such a symbol pair
we combine it into one 'P' symbol. For Sun cc we need to do this
- regardless of REG_STRUCT_HAS_ADDR, because the compiler puts out
+ regardless of DEPRECATED_REG_STRUCT_HAS_ADDR, because the compiler puts out
the 'p' symbol even if it never saves the argument onto the stack.
On most machines, we want to preserve both symbols, so that
@@ -1768,8 +1768,8 @@ define_symbol (CORE_ADDR valu, char *str
if (local_symbols
&& local_symbols->nsyms > 0
#ifndef USE_REGISTER_NOT_ARG
- && REG_STRUCT_HAS_ADDR_P ()
- && REG_STRUCT_HAS_ADDR (processing_gcc_compilation,
+ && DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
+ && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation,
SYMBOL_TYPE (sym))
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION
@@ -2050,8 +2050,8 @@ define_symbol (CORE_ADDR valu, char *str
/* When passing structures to a function, some systems sometimes pass
the address in a register, not the structure itself. */
- if (REG_STRUCT_HAS_ADDR_P ()
- && REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym))
+ if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
+ && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym))
&& (SYMBOL_CLASS (sym) == LOC_REGPARM || SYMBOL_CLASS (sym) == LOC_ARG))
{
struct type *symbol_type = check_typedef (SYMBOL_TYPE (sym));
@@ -2061,7 +2061,7 @@ define_symbol (CORE_ADDR valu, char *str
|| (TYPE_CODE (symbol_type) == TYPE_CODE_BITSTRING)
|| (TYPE_CODE (symbol_type) == TYPE_CODE_SET))
{
- /* If REG_STRUCT_HAS_ADDR yields non-zero we have to convert
+ /* If DEPRECATED_REG_STRUCT_HAS_ADDR yields non-zero we have to convert
LOC_REGPARM to LOC_REGPARM_ADDR for structures and unions. */
if (SYMBOL_CLASS (sym) == LOC_REGPARM)
SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.160
diff -u -p -r1.160 gdbint.texinfo
--- doc/gdbint.texinfo 11 Sep 2003 15:17:18 -0000 1.160
+++ doc/gdbint.texinfo 13 Sep 2003 14:10:43 -0000
@@ -3760,8 +3760,8 @@ or @code{NUL} to indicate that register
@findex REGISTER_NAMES
Deprecated in favor of @code{REGISTER_NAME}.
-@item REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
-@findex REG_STRUCT_HAS_ADDR
+@item DEPRECATED_REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
+@findex DEPRECATED_REG_STRUCT_HAS_ADDR
Define this to return 1 if the given type will be passed by pointer
rather than directly.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Deperectate REG_STRUCT_HAS_ADDR 2003-09-13 14:13 [PATCH] Deperectate REG_STRUCT_HAS_ADDR Mark Kettenis @ 2003-09-13 15:09 ` Andrew Cagney 2003-09-13 22:51 ` Mark Kettenis 2003-09-13 23:26 ` Mark Kettenis 0 siblings, 2 replies; 4+ messages in thread From: Andrew Cagney @ 2003-09-13 15:09 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb-patches > Index: ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Renamed from > REG_STRUCT_HAS_ADDR. > * gdbarch.c, gdbarch.h: Updated. > * infcall.c (call_function_by_hand): Update. > * stabsread.c (define_symbol): Updated. > > Index: doc/ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbint.texinfo (Target Architecture Definition): Replace > REG_STRUCT_HAS_ADDR with DEPRECATED_REG_STRUCT_HAS_ADDR. It's ok but only once the *-tdep.c files and the corrresponding cross targets have been rebuilt. You'll want ccache installed. Andrew ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Deperectate REG_STRUCT_HAS_ADDR 2003-09-13 15:09 ` Andrew Cagney @ 2003-09-13 22:51 ` Mark Kettenis 2003-09-13 23:26 ` Mark Kettenis 1 sibling, 0 replies; 4+ messages in thread From: Mark Kettenis @ 2003-09-13 22:51 UTC (permalink / raw) To: ac131313; +Cc: gdb-patches Date: Sat, 13 Sep 2003 11:08:59 -0400 From: Andrew Cagney <ac131313@redhat.com> User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en Cc: gdb-patches@sources.redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Status: No, hits=-3.5 required=5.0 tests=BAYES_10,FROM_ENDS_IN_NUMS,QUOTED_EMAIL_TEXT,REFERENCES, UPPERCASE_25_50,USER_AGENT_MOZILLA_UA version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) > Index: ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Renamed from > REG_STRUCT_HAS_ADDR. > * gdbarch.c, gdbarch.h: Updated. > * infcall.c (call_function_by_hand): Update. > * stabsread.c (define_symbol): Updated. > > Index: doc/ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbint.texinfo (Target Architecture Definition): Replace > REG_STRUCT_HAS_ADDR with DEPRECATED_REG_STRUCT_HAS_ADDR. It's ok but only once the *-tdep.c files and the corrresponding cross targets have been rebuilt. Hmm, I already checked the stuff in (and managed to break *everybody's* build by forgetting about gdbarch.[ch]). Will fix those *-tdep.c's ASAP. You'll want ccache installed. Me doing: $ cd /usr/ports/devel/ccache $ su # make install Looks promising. Andrew ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Deperectate REG_STRUCT_HAS_ADDR 2003-09-13 15:09 ` Andrew Cagney 2003-09-13 22:51 ` Mark Kettenis @ 2003-09-13 23:26 ` Mark Kettenis 1 sibling, 0 replies; 4+ messages in thread From: Mark Kettenis @ 2003-09-13 23:26 UTC (permalink / raw) To: ac131313; +Cc: gdb-patches Date: Sat, 13 Sep 2003 11:08:59 -0400 From: Andrew Cagney <ac131313@redhat.com> > Index: ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Renamed from > REG_STRUCT_HAS_ADDR. > * gdbarch.c, gdbarch.h: Updated. > * infcall.c (call_function_by_hand): Update. > * stabsread.c (define_symbol): Updated. > > Index: doc/ChangeLog > from Mark Kettenis <kettenis@gnu.org> > > * gdbint.texinfo (Target Architecture Definition): Replace > REG_STRUCT_HAS_ADDR with DEPRECATED_REG_STRUCT_HAS_ADDR. It's ok but only once the *-tdep.c files and the corrresponding cross targets have been rebuilt. I checked in the attached. I built all the relevant targets mentioned in MAINTAINERS, that is, all those whose *-tdep.c files I changes, except hppa-elf, which is marked as broken. Sorry for the inconvenience. Mark Index: ChangeLog from Mark Kettenis <kettenis@gnu.org> * cris-tdep.c (cris_gdbarch_init): Set deprecated_reg_struct_has_addr instead of reg_struct_has_addr. * hppa-tdep.c (hppa_gdbarch_init): Likewise. * mcore-tdep.c (mcore_gdbarch_init): Likewise. * mips-tdep.c (mips_gdbarch_init): Likewise. * mn10300-tdep.c (mn10300_gdbarch_init): Likewise. * sparc-tdep.c (sparc_gdbarch_init): Likewise. Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.83 diff -u -p -r1.83 cris-tdep.c --- cris-tdep.c 12 Sep 2003 18:40:16 -0000 1.83 +++ cris-tdep.c 13 Sep 2003 23:20:36 -0000 @@ -4156,7 +4156,7 @@ cris_gdbarch_init (struct gdbarch_info i cris_abi_original_store_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, cris_abi_original_extract_return_value); - set_gdbarch_reg_struct_has_addr + set_gdbarch_deprecated_reg_struct_has_addr (gdbarch, cris_abi_original_reg_struct_has_addr); } else if (tdep->cris_abi == CRIS_ABI_V2) @@ -4166,8 +4166,8 @@ cris_gdbarch_init (struct gdbarch_info i set_gdbarch_deprecated_store_return_value (gdbarch, cris_abi_v2_store_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, cris_abi_v2_extract_return_value); - set_gdbarch_reg_struct_has_addr (gdbarch, - cris_abi_v2_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, cris_abi_v2_reg_struct_has_addr); } else internal_error (__FILE__, __LINE__, "cris_gdbarch_init: unknown CRIS ABI"); Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.93 diff -u -p -r1.93 hppa-tdep.c --- hppa-tdep.c 11 Sep 2003 15:17:15 -0000 1.93 +++ hppa-tdep.c 13 Sep 2003 23:20:39 -0000 @@ -5119,7 +5119,8 @@ hppa_gdbarch_init (struct gdbarch_info i set_gdbarch_deprecated_call_dummy_length (gdbarch, hppa32_call_dummy_length); set_gdbarch_deprecated_stack_align (gdbarch, hppa32_stack_align); - set_gdbarch_reg_struct_has_addr (gdbarch, hppa_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, hppa_reg_struct_has_addr); set_gdbarch_deprecated_extract_return_value (gdbarch, hppa32_extract_return_value); set_gdbarch_use_struct_convention Index: mcore-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mcore-tdep.c,v retrieving revision 1.74 diff -u -p -r1.74 mcore-tdep.c --- mcore-tdep.c 9 Sep 2003 04:41:32 -0000 1.74 +++ mcore-tdep.c 13 Sep 2003 23:20:39 -0000 @@ -1115,7 +1115,8 @@ mcore_gdbarch_init (struct gdbarch_info set_gdbarch_believe_pcc_promotion (gdbarch, 1); /* MCore will never pass a sturcture by reference. It will always be split between registers and stack. */ - set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mcore_reg_struct_has_addr); /* Should be using push_dummy_call. */ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.229 diff -u -p -r1.229 mips-tdep.c --- mips-tdep.c 12 Sep 2003 18:40:17 -0000 1.229 +++ mips-tdep.c 13 Sep 2003 23:20:42 -0000 @@ -5898,8 +5898,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_bit (gdbarch, 32); set_gdbarch_ptr_bit (gdbarch, 32); set_gdbarch_long_long_bit (gdbarch, 64); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_o32_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_o32_reg_struct_has_addr); set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention); break; @@ -5917,8 +5917,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_bit (gdbarch, 32); set_gdbarch_ptr_bit (gdbarch, 32); set_gdbarch_long_long_bit (gdbarch, 64); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_o32_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_o32_reg_struct_has_addr); set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention); break; case MIPS_ABI_EABI32: @@ -5935,8 +5935,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_bit (gdbarch, 32); set_gdbarch_ptr_bit (gdbarch, 32); set_gdbarch_long_long_bit (gdbarch, 64); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_eabi_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_eabi_reg_struct_has_addr); set_gdbarch_use_struct_convention (gdbarch, mips_eabi_use_struct_convention); break; @@ -5954,8 +5954,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_bit (gdbarch, 64); set_gdbarch_ptr_bit (gdbarch, 64); set_gdbarch_long_long_bit (gdbarch, 64); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_eabi_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_eabi_reg_struct_has_addr); set_gdbarch_use_struct_convention (gdbarch, mips_eabi_use_struct_convention); break; @@ -5975,8 +5975,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_use_struct_convention (gdbarch, mips_n32n64_use_struct_convention); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_n32n64_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_n32n64_reg_struct_has_addr); break; case MIPS_ABI_N64: set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call); @@ -5994,8 +5994,8 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_long_bit (gdbarch, 64); set_gdbarch_use_struct_convention (gdbarch, mips_n32n64_use_struct_convention); - set_gdbarch_reg_struct_has_addr (gdbarch, - mips_n32n64_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mips_n32n64_reg_struct_has_addr); break; default: internal_error (__FILE__, __LINE__, Index: mn10300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v retrieving revision 1.87 diff -u -p -r1.87 mn10300-tdep.c --- mn10300-tdep.c 9 Sep 2003 04:41:32 -0000 1.87 +++ mn10300-tdep.c 13 Sep 2003 23:20:43 -0000 @@ -1209,7 +1209,8 @@ mn10300_gdbarch_init (struct gdbarch_inf set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mn10300_call_dummy_words)); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments); - set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, mn10300_reg_struct_has_addr); set_gdbarch_deprecated_push_return_address (gdbarch, mn10300_push_return_address); set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention); Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.123 diff -u -p -r1.123 sparc-tdep.c --- sparc-tdep.c 11 Sep 2003 15:17:15 -0000 1.123 +++ sparc-tdep.c 13 Sep 2003 23:20:45 -0000 @@ -3285,7 +3285,8 @@ sparc_gdbarch_init (struct gdbarch_info set_gdbarch_deprecated_pop_frame (gdbarch, sparc_pop_frame); set_gdbarch_deprecated_push_return_address (gdbarch, sparc_push_return_address); set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame); - set_gdbarch_reg_struct_has_addr (gdbarch, sparc_reg_struct_has_addr); + set_gdbarch_deprecated_reg_struct_has_addr + (gdbarch, sparc_reg_struct_has_addr); set_gdbarch_return_value_on_stack (gdbarch, sparc_return_value_on_stack); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sparc_saved_pc_after_call); set_gdbarch_prologue_frameless_p (gdbarch, sparc_prologue_frameless_p); ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-13 23:26 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-09-13 14:13 [PATCH] Deperectate REG_STRUCT_HAS_ADDR Mark Kettenis 2003-09-13 15:09 ` Andrew Cagney 2003-09-13 22:51 ` Mark Kettenis 2003-09-13 23:26 ` Mark Kettenis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox