From: Andrew Cagney <cagney@gnu.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: "J. Johnston" <jjohnstn@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [obish] -Wunused-function warnings
Date: Tue, 03 Feb 2004 22:23:00 -0000 [thread overview]
Message-ID: <40201F70.30207@gnu.org> (raw)
In-Reply-To: <20040119162144.64202cb5@saguaro>
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
> On Mon, 19 Jan 2004 13:31:23 -0500
> Andrew Cagney <cagney@gnu.org> 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
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4035 bytes --]
2004-02-03 Andrew Cagney <cagney@redhat.com>
* 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
prev parent reply other threads:[~2004-02-03 22:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-11 18:26 Andrew Cagney
2004-01-12 2:05 ` Daniel Jacobowitz
2004-01-12 14:58 ` Andrew Cagney
2004-01-15 18:46 ` Elena Zannoni
2004-01-17 1:04 ` [commit] rm unused symtab & sh functions; Was: " Andrew Cagney
2004-01-19 18:31 ` Andrew Cagney
2004-01-19 23:14 ` Kevin Buettner
2004-01-19 23:21 ` Kevin Buettner
2004-02-03 22:23 ` Andrew Cagney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40201F70.30207@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox