From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21946 invoked by alias); 3 Feb 2004 22:23:44 -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 21933 invoked from network); 3 Feb 2004 22:23:44 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 3 Feb 2004 22:23:44 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 064232B92; Tue, 3 Feb 2004 17:23:45 -0500 (EST) Message-ID: <40201F70.30207@gnu.org> Date: Tue, 03 Feb 2004 22:23:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Kevin Buettner Cc: "J. Johnston" , gdb-patches@sources.redhat.com Subject: Re: [obish] -Wunused-function warnings References: <400194E8.10201@gnu.org> <400C227B.9040704@gnu.org> <20040119162144.64202cb5@saguaro> Content-Type: multipart/mixed; boundary="------------020702070201060704050805" X-SW-Source: 2004-02/txt/msg00056.txt.bz2 This is a multi-part message in MIME format. --------------020702070201060704050805 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 601 > On Mon, 19 Jan 2004 13:31:23 -0500 > Andrew Cagney wrote: > > >> src/gdb/ia64-tdep.c:3261: warning: `process_note_abi_tag_sections' defined but not used >> src/gdb/ia64-tdep.c:342: warning: `read_sigcontext_register' defined but not used >> src/gdb/ia64-tdep.c:654: warning: `ia64_read_fp' defined but not used > > > It appears to me that it's safe to remove these function definitions. > > Jeff, would mind trying it out? If everything still builds and runs > okay, the patch which removes these definitions is preapproved. I've done this, committing the attached. Andrew --------------020702070201060704050805 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 4035 2004-02-03 Andrew Cagney * ia64-tdep.c (read_sigcontext_register): Delete unused function. (process_note_abi_tag_sections): Delete unused function. (ia64_read_fp): Delete unused function. (gdbarch_extract_struct_value_address): Delete declaration. Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.110 diff -u -r1.110 ia64-tdep.c --- ia64-tdep.c 26 Jan 2004 20:52:10 -0000 1.110 +++ ia64-tdep.c 3 Feb 2004 22:20:51 -0000 @@ -102,7 +102,6 @@ static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc; static gdbarch_skip_prologue_ftype ia64_skip_prologue; static gdbarch_extract_return_value_ftype ia64_extract_return_value; -static gdbarch_extract_struct_value_address_ftype ia64_extract_struct_value_address; static gdbarch_use_struct_convention_ftype ia64_use_struct_convention; static struct type *is_float_or_hfa_type (struct type *t); @@ -334,32 +333,6 @@ }; -/* Read the given register from a sigcontext structure in the - specified frame. */ - -static CORE_ADDR -read_sigcontext_register (struct frame_info *frame, int regnum) -{ - CORE_ADDR regaddr; - - if (frame == NULL) - internal_error (__FILE__, __LINE__, - "read_sigcontext_register: NULL frame"); - if (!(get_frame_type (frame) == SIGTRAMP_FRAME)) - internal_error (__FILE__, __LINE__, - "read_sigcontext_register: frame not a signal trampoline"); - if (SIGCONTEXT_REGISTER_ADDRESS == 0) - internal_error (__FILE__, __LINE__, - "read_sigcontext_register: SIGCONTEXT_REGISTER_ADDRESS is 0"); - - regaddr = SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regnum); - if (regaddr) - return read_memory_integer (regaddr, register_size (current_gdbarch, regnum)); - else - internal_error (__FILE__, __LINE__, - "read_sigcontext_register: Register %d not in struct sigcontext", regnum); -} - /* Extract ``len'' bits from an instruction bundle starting at bit ``from''. */ @@ -650,18 +623,6 @@ } static CORE_ADDR -ia64_read_fp (void) -{ - /* We won't necessarily have a frame pointer and even if we do, it - winds up being extraordinarly messy when attempting to find the - frame chain. So for the purposes of creating frames (which is - all deprecated_read_fp() is used for), simply use the stack - pointer value instead. */ - gdb_assert (SP_REGNUM >= 0); - return read_register (SP_REGNUM); -} - -static CORE_ADDR ia64_read_pc (ptid_t ptid) { CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, ptid); @@ -3254,53 +3215,6 @@ { *targ_addr = memaddr; *targ_len = nr_bytes; -} - -static void -process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj) -{ - int *os_ident_ptr = obj; - const char *name; - unsigned int sectsize; - - name = bfd_get_section_name (abfd, sect); - sectsize = bfd_section_size (abfd, sect); - if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0) - { - unsigned int name_length, data_length, note_type; - char *note = alloca (sectsize); - - bfd_get_section_contents (abfd, sect, note, - (file_ptr) 0, (bfd_size_type) sectsize); - - name_length = bfd_h_get_32 (abfd, note); - data_length = bfd_h_get_32 (abfd, note + 4); - note_type = bfd_h_get_32 (abfd, note + 8); - - if (name_length == 4 && data_length == 16 && note_type == 1 - && strcmp (note + 12, "GNU") == 0) - { - int os_number = bfd_h_get_32 (abfd, note + 16); - - /* The case numbers are from abi-tags in glibc. */ - switch (os_number) - { - case 0 : - *os_ident_ptr = ELFOSABI_LINUX; - break; - case 1 : - *os_ident_ptr = ELFOSABI_HURD; - break; - case 2 : - *os_ident_ptr = ELFOSABI_SOLARIS; - break; - default : - internal_error (__FILE__, __LINE__, - "process_note_abi_sections: unknown OS number %d", os_number); - break; - } - } - } } static int --------------020702070201060704050805--