From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20094 invoked by alias); 8 Jun 2007 23:20:16 -0000 Received: (qmail 20075 invoked by uid 22791); 8 Jun 2007 23:20:15 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Jun 2007 23:20:13 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id l58NKBIL073140 for ; Fri, 8 Jun 2007 23:20:11 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l58NKA234165696 for ; Sat, 9 Jun 2007 01:20:10 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l58NKAxf018910 for ; Sat, 9 Jun 2007 01:20:10 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l58NKAWD018907; Sat, 9 Jun 2007 01:20:10 +0200 Message-Id: <200706082320.l58NKAWD018907@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sat, 9 Jun 2007 01:20:10 +0200 Subject: Re: [7/10] Remove unused builtin_type_frame_reg To: uweigand@de.ibm.com (Ulrich Weigand) Date: Fri, 08 Jun 2007 23:20:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <200706082316.l58NGxdb017802@d12av02.megacenter.de.ibm.com> from "Ulrich Weigand" at Jun 09, 2007 01:16:59 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00123.txt.bz2 Oops, wrong file attached. This is the right one: Hello, std-regs.c contains another gdbarch-swapped type, but this is actually nowhere used (the code that uses it is disabled). This patch removes that disable code completely; if at any time in the future we want to re-enable it, that type needs to implemented properly. Bye, Ulrich ChangeLog: * std-regs.c (builtin_type_frame_reg, build_builtin_type_frame_reg, value_of_builtin_frame_reg): Remove. (_initialize_frame_reg): Do not swap builtin_type_frame_reg. Remove inactive call to value_of_builtin_frame_reg. diff -urNp gdb-orig/gdb/std-regs.c gdb-head/gdb/std-regs.c --- gdb-orig/gdb/std-regs.c 2007-06-06 17:19:37.000000000 +0200 +++ gdb-head/gdb/std-regs.c 2007-06-08 18:38:09.209782869 +0200 @@ -28,48 +28,6 @@ #include "value.h" #include "gdb_string.h" -/* Types that describe the various builtin registers. */ - -static struct type *builtin_type_frame_reg; - -/* Constructors for those types. */ - -static void -build_builtin_type_frame_reg (void) -{ - /* $frame. */ - if (builtin_type_frame_reg == NULL) - { -#if 0 - struct frame - { - void *base; - }; -#endif - builtin_type_frame_reg = init_composite_type ("frame", TYPE_CODE_STRUCT); - append_composite_type_field (builtin_type_frame_reg, "base", - builtin_type_void_data_ptr); - } -} - -static struct value * -value_of_builtin_frame_reg (struct frame_info *frame, const void *baton) -{ - struct value *val; - gdb_byte *buf; - build_builtin_type_frame_reg (); - val = allocate_value (builtin_type_frame_reg); - VALUE_LVAL (val) = not_lval; - buf = value_contents_raw (val); - memset (buf, 0, TYPE_LENGTH (value_type (val))); - /* frame.base. */ - if (frame != NULL) - gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr, - buf, get_frame_base (frame)); - buf += TYPE_LENGTH (builtin_type_void_data_ptr); - /* frame.XXX. */ - return val; -} static struct value * value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton) @@ -138,12 +96,6 @@ extern initialize_file_ftype _initialize void _initialize_frame_reg (void) { - /* FIXME: cagney/2002-02-08: At present the local builtin types - can't be initialized using _initialize*() or gdbarch. Due mainly - to non-multi-arch targets, GDB initializes things piece meal and, - as a consequence can leave these types NULL. */ - DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_frame_reg); - /* Frame based $fp, $pc, $sp and $ps. These only come into play when the target does not define its own version of these registers. */ @@ -151,10 +103,4 @@ _initialize_frame_reg (void) user_reg_add_builtin ("pc", value_of_builtin_frame_pc_reg, NULL); user_reg_add_builtin ("sp", value_of_builtin_frame_sp_reg, NULL); user_reg_add_builtin ("ps", value_of_builtin_frame_ps_reg, NULL); - - /* NOTE: cagney/2002-04-05: For moment leave the $frame / $gdbframe - / $gdb.frame disabled. It isn't yet clear which of the many - options is the best. */ - if (0) - user_reg_add_builtin ("frame", value_of_builtin_frame_reg, NULL); } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com