From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2840 invoked by alias); 13 Sep 2003 14:13:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2825 invoked from network); 13 Sep 2003 14:13:17 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 13 Sep 2003 14:13:17 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p2/8.12.5) with ESMTP id h8DEDGxA008214 for ; Sat, 13 Sep 2003 16:13:16 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6) with ESMTP id h8DEDFJA012281 for ; Sat, 13 Sep 2003 16:13:15 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6/Submit) id h8DEDFlB012278; Sat, 13 Sep 2003 16:13:15 +0200 (CEST) Date: Sat, 13 Sep 2003 14:13:00 -0000 Message-Id: <200309131413.h8DEDFlB012278@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Deperectate REG_STRUCT_HAS_ADDR X-SW-Source: 2003-09/txt/msg00287.txt.bz2 No alterbative yet, but that will come soon. Mark Index: ChangeLog from Mark Kettenis * 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 * 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.