* [obish] -Wunused-function warnings
@ 2004-01-11 18:26 Andrew Cagney
2004-01-12 2:05 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Andrew Cagney @ 2004-01-11 18:26 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
Hello,
Attached is a list of all the -Wunused-function warnings that I'm
seeing. Since all these functions are unreachable (i.e., dead code), I
think their removal is pretty obvious.
However, before I start doing this, I might as well give architecture
maintainers an oportunity to look over their code. It will make the
task of removing this stuff easier.
I'll follow up in a week,
enjoy,
Andrew
[-- Attachment #2: errors --]
[-- Type: text/plain, Size: 5926 bytes --]
src/gdb/arm-tdep.c:1196: warning: `arm_push_return_address' defined but not used
src/gdb/arm-tdep.c:1205: warning: `arm_push_dummy_frame' defined but not used
src/gdb/arm-tdep.c:1287: warning: `arm_fix_call_dummy' defined but not used
src/gdb/avr-tdep.c:231: warning: `avr_iaddr_p' defined but not used
src/gdb/avr-tdep.c:256: warning: `avr_saddr_p' defined but not used
src/gdb/ax-gdb.c:1807: warning: `print_axs_value' defined but not used
src/gdb/breakpoint.c:6009: warning: `ep_parse_optional_filename' defined but not used
src/gdb/cli/cli-cmds.c:62: warning: `validate_comname' declared `static' but never defined
src/gdb/cli/cli-dump.c:335: warning: `dump_filetype' defined but not used
src/gdb/cris-tdep.c:175: warning: `cris_abi' defined but not used
src/gdb/cris-tdep.c:2797: warning: `reg_pop_op' defined but not used
src/gdb/cris-tdep.c:2825: warning: `move_reg_to_mem_index_inc_op' defined but not used
src/gdb/cris-tdep.c:298: warning: `cris_get_wide_opcode' defined but not used
src/gdb/cris-tdep.c:304: warning: `cris_get_short_size' defined but not used
src/gdb/cris-tdep.c:334: warning: `cris_get_asr_quick_shift_steps' defined but not used
src/gdb/cris-tdep.c:727: warning: `cris_skip_prologue_frameless_p' defined but not used
src/gdb/d10v-tdep.c:297: warning: `d10v_daddr_p' defined but not used
src/gdb/dink32-rom.c:101: warning: `dink32_load' defined but not used
src/gdb/dwarf2read.c:615: warning: `dwarf2_unsupported_at_frame_base_complaint' defined but not used
src/gdb/frv-tdep.c:47: warning: `frv_push_arguments' declared `static' but never defined
src/gdb/frv-tdep.c:48: warning: `frv_saved_pc_after_call' declared `static' but never defined
src/gdb/gdbtypes.c:130: warning: `add_name' declared `static' but never defined
src/gdb/gdbtypes.c:131: warning: `add_mangled_type' declared `static' but never defined
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
src/gdb/infrun.c:65: warning: `set_follow_fork_mode_command' declared `static' but never defined
src/gdb/jv-lang.c:769: warning: `java_lookup_type' defined but not used
src/gdb/m32r-rom.c:406: warning: `m32r_set_board_address' defined but not used
src/gdb/m32r-rom.c:425: warning: `m32r_set_server_address' defined but not used
src/gdb/m32r-rom.c:444: warning: `m32r_set_download_path' defined but not used
src/gdb/m68k-tdep.c:153: warning: `m68k_register_byte' defined but not used
src/gdb/m68k-tdep.c:77: warning: `m68k_remote_breakpoint_from_pc' defined but not used
src/gdb/maint.c:57: warning: `print_section_table' declared `static' but never defined
src/gdb/mi/mi-cmd-env.c:40: warning: `env_cli_command' declared `static' but never defined
src/gdb/mi/mi-interp.c:304: warning: `mi_interp_read_one_line_hook' defined but not used
src/gdb/mi/mi-interp.c:315: warning: `output_control_change_notification' defined but not used
src/gdb/mi/mi-out.c:300: warning: `out_field_fmt' defined but not used
src/gdb/mips-tdep.c:661: warning: `mips_convert_register_p' defined but not used
src/gdb/mips-tdep.c:672: warning: `mips_register_to_value' defined but not used
src/gdb/mips-tdep.c:680: warning: `mips_value_to_register' defined but not used
src/gdb/mn10300-tdep.c:1108: warning: `mn10300_dump_tdep' defined but not used
src/gdb/monitor.c:1520: warning: `monitor_write_even_block' defined but not used
src/gdb/ocd.c:1355: warning: `bdm_read_register_command' defined but not used
src/gdb/ocd.c:49: warning: `reset_packet' declared `static' but never defined
src/gdb/ocd.c:51: warning: `output_packet' declared `static' but never defined
src/gdb/ocd.c:53: warning: `get_quoted_char' declared `static' but never defined
src/gdb/ocd.c:55: warning: `put_quoted_char' declared `static' but never defined
src/gdb/remote.c:1585: warning: `adapt_remote_get_threadinfo' defined but not used
src/gdb/remote-fileio.c:368: warning: `remote_fileio_to_fio_int' defined but not used
src/gdb/remote-mips.c:2435: warning: `remote_mips_insert_hw_breakpoint' defined but not used
src/gdb/remote-mips.c:2448: warning: `remote_mips_remove_hw_breakpoint' defined but not used
src/gdb/remote-mips.c:606: warning: `mips_getstring' defined but not used
src/gdb/remote-rdi.c:142: warning: `arm_rdi_start_remote' defined but not used
src/gdb/remote-rdi.c:491: warning: `arm_rdi_interrupt' defined but not used
src/gdb/remote-rdi.c:499: warning: `arm_rdi_interrupt_twice' defined but not used
src/gdb/remote-rdi.c:506: warning: `interrupt_query' defined but not used
src/gdb/remote-rdi.c:79: warning: `arm_rdi_mourn' declared `static' but never defined
src/gdb/remote-rdi.c:81: warning: `arm_rdi_send' declared `static' but never defined
src/gdb/remote-sds.c:285: warning: `tohex' defined but not used
src/gdb/rs6000-tdep.c:2045: warning: `rs6000_pc_in_call_dummy' defined but not used
src/gdb/s390-tdep.c:1571: warning: `s390_function_start' defined but not used
src/gdb/sh64-tdep.c:835: warning: `sh64_get_gdb_regnum' defined but not used
src/gdb/source.c:1243: warning: `ambiguous_line_spec' defined but not used
src/gdb/sparc-tdep.c:841: warning: `sparc_extract_struct_value_address' defined but not used
src/gdb/stabsread.c:199: warning: `lrs_general_complaint' defined but not used
src/gdb/stabsread.c:540: warning: `ref_search_value' defined but not used
src/gdb/stabsread.c:92: warning: `get_substring' declared `static' but never defined
src/gdb/symfile.c:208: warning: `compare_symbols' defined but not used
src/gdb/target.c:1620: warning: `normal_target_post_startup_inferior' defined but not used
src/gdb/ui-out.c:272: warning: `init_ui_out_state' declared `static' but never defined
src/gdb/v850-tdep.c:256: warning: `v850_register_virtual_size' defined but not used
src/gdb/xstormy16-tdep.c:160: warning: `xstormy16_register_virtual_size' defined but not used
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [obish] -Wunused-function warnings 2004-01-11 18:26 [obish] -Wunused-function warnings 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-19 18:31 ` Andrew Cagney 2 siblings, 1 reply; 9+ messages in thread From: Daniel Jacobowitz @ 2004-01-12 2:05 UTC (permalink / raw) To: gdb-patches On Sun, Jan 11, 2004 at 01:24:40PM -0500, Andrew Cagney wrote: > src/gdb/arm-tdep.c:1196: warning: `arm_push_return_address' defined but not used > src/gdb/arm-tdep.c:1205: warning: `arm_push_dummy_frame' defined but not used > src/gdb/arm-tdep.c:1287: warning: `arm_fix_call_dummy' defined but not used I'm not the ARM maintainer, but I was the last person to touch this. I'm pretty sure I either rendered these obsolete or they already were unnecessary, so they can probably go. > src/gdb/breakpoint.c:6009: warning: `ep_parse_optional_filename' defined but not used Did you test on a target without SOLIB_ADD? These are conditionally used. Things to do: finish multi-arching solibs... > src/gdb/infrun.c:65: warning: `set_follow_fork_mode_command' declared `static' but never defined Yeah, dead. Probably since add_set_enum_cmd. > src/gdb/mips-tdep.c:661: warning: `mips_convert_register_p' defined but not used > src/gdb/mips-tdep.c:672: warning: `mips_register_to_value' defined but not used > src/gdb/mips-tdep.c:680: warning: `mips_value_to_register' defined but not used Ya! -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 2004-01-12 2:05 ` Daniel Jacobowitz @ 2004-01-12 14:58 ` Andrew Cagney 0 siblings, 0 replies; 9+ messages in thread From: Andrew Cagney @ 2004-01-12 14:58 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches >> src/gdb/breakpoint.c:6009: warning: `ep_parse_optional_filename' defined but not used > > > Did you test on a target without SOLIB_ADD? These are conditionally > used. Things to do: finish multi-arching solibs... The list comes from building all the cross targets listed in the MAINTAINERS file. The problem of #ifdef code is one reason for posting this first - if things are cleaned up a little the removal task becomes much easier (a search of the GDB tree will be needed for each apparently unused function). I don't know where solibs are at. >> src/gdb/infrun.c:65: warning: `set_follow_fork_mode_command' declared `static' but never defined > > > Yeah, dead. Probably since add_set_enum_cmd. > > >> src/gdb/mips-tdep.c:661: warning: `mips_convert_register_p' defined but not used >> src/gdb/mips-tdep.c:672: warning: `mips_register_to_value' defined but not used >> src/gdb/mips-tdep.c:680: warning: `mips_value_to_register' defined but not used > > > Ya! Actually, I suspect that they are needed - never got hooked up when merged from a branch :-( My MIPS boxes are finally back up so I can check this. Andrew ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 2004-01-11 18:26 [obish] -Wunused-function warnings Andrew Cagney 2004-01-12 2:05 ` Daniel Jacobowitz @ 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 2 siblings, 1 reply; 9+ messages in thread From: Elena Zannoni @ 2004-01-15 18:46 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches Andrew Cagney writes: > Hello, > > Attached is a list of all the -Wunused-function warnings that I'm > seeing. Since all these functions are unreachable (i.e., dead code), I > think their removal is pretty obvious. > src/gdb/dwarf2read.c:615: warning: `dwarf2_unsupported_at_frame_base_complaint' defined but not used yes > src/gdb/sh64-tdep.c:835: warning: `sh64_get_gdb_regnum' defined but not used yes > src/gdb/stabsread.c:199: warning: `lrs_general_complaint' defined but not used yes, leftover from live range splitting cleanup. > src/gdb/stabsread.c:540: warning: `ref_search_value' defined but not used ditto > src/gdb/stabsread.c:92: warning: `get_substring' declared `static' but never defined leftover from cfront cleanup function was deleted but proto is still there. > src/gdb/symfile.c:208: warning: `compare_symbols' defined but not used leftover from David's cleanups. So all ok. elena ^ permalink raw reply [flat|nested] 9+ messages in thread
* [commit] rm unused symtab & sh functions; Was: [obish] -Wunused-function warnings 2004-01-15 18:46 ` Elena Zannoni @ 2004-01-17 1:04 ` Andrew Cagney 0 siblings, 0 replies; 9+ messages in thread From: Andrew Cagney @ 2004-01-17 1:04 UTC (permalink / raw) To: Elena Zannoni; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1033 bytes --] > Andrew Cagney writes: > > Hello, > > > > Attached is a list of all the -Wunused-function warnings that I'm > > seeing. Since all these functions are unreachable (i.e., dead code), I > > think their removal is pretty obvious. > > > src/gdb/dwarf2read.c:615: warning: `dwarf2_unsupported_at_frame_base_complaint' defined but not used > > yes > > > src/gdb/sh64-tdep.c:835: warning: `sh64_get_gdb_regnum' defined but not used > > yes > > > src/gdb/stabsread.c:199: warning: `lrs_general_complaint' defined but not used > > yes, leftover from live range splitting cleanup. > > > src/gdb/stabsread.c:540: warning: `ref_search_value' defined but not used > > ditto > > > src/gdb/stabsread.c:92: warning: `get_substring' declared `static' but never defined > > leftover from cfront cleanup function was deleted but proto is still there. > > > src/gdb/symfile.c:208: warning: `compare_symbols' defined but not used > > leftover from David's cleanups. > > So all ok. Ya! I've committed the attached. Andrew [-- Attachment #2: diffs --] [-- Type: text/plain, Size: 4816 bytes --] 2004-01-16 Andrew Cagney <cagney@redhat.com> * symfile.c: Update copyright year. (compare_symbols): Delete unused function. * stabsread.c: Update copyright year. (lrs_general_complaint): Delete unused function. (ref_search_value): Ditto. (get_substring): Delete declaration. * sh64-tdep.c: Update copyright year. (sh64_get_gdb_regnum): Delete unused function. * dwarf2read.c (dwarf2_unsupported_at_frame_base_complaint): Delete unused function. Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.120 diff -u -r1.120 dwarf2read.c --- dwarf2read.c 14 Jan 2004 16:54:41 -0000 1.120 +++ dwarf2read.c 17 Jan 2004 01:03:23 -0000 @@ -612,13 +612,6 @@ } static void -dwarf2_unsupported_at_frame_base_complaint (const char *arg1) -{ - complaint (&symfile_complaints, - "unsupported DW_AT_frame_base for function '%s'", arg1); -} - -static void dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, int arg3) { Index: sh64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh64-tdep.c,v retrieving revision 1.16 diff -u -r1.16 sh64-tdep.c --- sh64-tdep.c 13 Jan 2004 21:38:47 -0000 1.16 +++ sh64-tdep.c 17 Jan 2004 01:03:23 -0000 @@ -1,6 +1,7 @@ /* Target-dependent code for Renesas Super-H, for GDB. - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -828,12 +829,6 @@ is_media_pseudo (int rn) { return (rn >= DR0_REGNUM && rn <= FV_LAST_REGNUM); -} - -static int -sh64_get_gdb_regnum (int gcc_regnum, CORE_ADDR pc) -{ - return translate_insn_rn (gcc_regnum, pc_is_isa32 (pc)); } static int Index: stabsread.c =================================================================== RCS file: /cvs/src/src/gdb/stabsread.c,v retrieving revision 1.70 diff -u -r1.70 stabsread.c --- stabsread.c 5 Jan 2004 19:53:07 -0000 1.70 +++ stabsread.c 17 Jan 2004 01:03:23 -0000 @@ -1,7 +1,8 @@ /* Support routines for decoding "stabs" debugging information format. - Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, - 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free + Software Foundation, Inc. This file is part of GDB. @@ -89,8 +90,6 @@ read_one_struct_field (struct field_info *, char **, char *, struct type *, struct objfile *); -static char *get_substring (char **, int); - static struct type *dbx_alloc_type (int[2], struct objfile *); static long read_huge_number (char **, int, int *); @@ -194,12 +193,6 @@ complaint (&symfile_complaints, "%s", arg1); } -static void -lrs_general_complaint (const char *arg1) -{ - complaint (&symfile_complaints, "%s", arg1); -} - /* Make a list of forward references which haven't been defined. */ static struct type **undef_types; @@ -531,16 +524,6 @@ if (refnum < 0 || refnum > ref_count) return 0; return ref_map[refnum].sym; -} - -/* Return value for the reference REFNUM. */ - -static CORE_ADDR -ref_search_value (int refnum) -{ - if (refnum < 0 || refnum > ref_count) - return 0; - return ref_map[refnum].value; } /* Parse a reference id in STRING and return the resulting Index: symfile.c =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.114 diff -u -r1.114 symfile.c --- symfile.c 23 Nov 2003 19:24:05 -0000 1.114 +++ symfile.c 17 Jan 2004 01:03:23 -0000 @@ -1,7 +1,7 @@ /* Generic symbol file reading for the GNU debugger, GDB. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Cygnus Support, using pieces from other GDB modules. @@ -198,20 +198,6 @@ int auto_solib_limit; \f - -/* Since this function is called from within qsort, in an ANSI environment - it must conform to the prototype for qsort, which specifies that the - comparison function takes two "void *" pointers. */ - -static int -compare_symbols (const void *s1p, const void *s2p) -{ - struct symbol **s1, **s2; - - s1 = (struct symbol **) s1p; - s2 = (struct symbol **) s2p; - return (strcmp (SYMBOL_NATURAL_NAME (*s1), SYMBOL_NATURAL_NAME (*s2))); -} /* This compares two partial symbols by names, using strcmp_iw_ordered for the comparison. */ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 2004-01-11 18:26 [obish] -Wunused-function warnings Andrew Cagney 2004-01-12 2:05 ` Daniel Jacobowitz 2004-01-15 18:46 ` Elena Zannoni @ 2004-01-19 18:31 ` Andrew Cagney 2004-01-19 23:14 ` Kevin Buettner 2004-01-19 23:21 ` Kevin Buettner 2 siblings, 2 replies; 9+ messages in thread From: Andrew Cagney @ 2004-01-19 18:31 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 590 bytes --] > Hello, > > Attached is a list of all the -Wunused-function warnings that I'm seeing. Since all these functions are unreachable (i.e., dead code), I think their removal is pretty obvious. > > However, before I start doing this, I might as well give architecture maintainers an oportunity to look over their code. It will make the task of removing this stuff easier. > > I'll follow up in a week, Here's this week's list. It's noticably shorter, and core-GDB items still remaining have been figured out. Again, can I encourage architecture maintainers to check this out. Andrew [-- Attachment #2: errors --] [-- Type: text/plain, Size: 3446 bytes --] src/gdb/arm-tdep.c:1196: warning: `arm_push_return_address' defined but not used src/gdb/arm-tdep.c:1205: warning: `arm_push_dummy_frame' defined but not used src/gdb/arm-tdep.c:1287: warning: `arm_fix_call_dummy' defined but not used src/gdb/avr-tdep.c:231: warning: `avr_iaddr_p' defined but not used src/gdb/avr-tdep.c:256: warning: `avr_saddr_p' defined but not used src/gdb/ax-gdb.c:1807: warning: `print_axs_value' defined but not used src/gdb/breakpoint.c:5987: warning: `ep_parse_optional_filename' defined but not used src/gdb/cli/cli-cmds.c:62: warning: `validate_comname' declared `static' but never defined src/gdb/cli/cli-dump.c:335: warning: `dump_filetype' defined but not used src/gdb/cris-tdep.c:177: warning: `cris_abi' defined but not used src/gdb/cris-tdep.c:2784: warning: `reg_pop_op' defined but not used src/gdb/cris-tdep.c:2812: warning: `move_reg_to_mem_index_inc_op' defined but not used src/gdb/cris-tdep.c:297: warning: `cris_get_wide_opcode' defined but not used src/gdb/cris-tdep.c:303: warning: `cris_get_short_size' defined but not used src/gdb/cris-tdep.c:333: warning: `cris_get_asr_quick_shift_steps' defined but not used src/gdb/cris-tdep.c:726: warning: `cris_skip_prologue_frameless_p' defined but not used src/gdb/d10v-tdep.c:297: warning: `d10v_daddr_p' defined but not used src/gdb/dink32-rom.c:101: warning: `dink32_load' defined but not used src/gdb/frv-tdep.c:47: warning: `frv_push_arguments' declared `static' but never defined src/gdb/frv-tdep.c:48: warning: `frv_saved_pc_after_call' declared `static' but never defined src/gdb/gdbtypes.c:130: warning: `add_name' declared `static' but never defined src/gdb/gdbtypes.c:131: warning: `add_mangled_type' declared `static' but never defined 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 src/gdb/jv-lang.c:769: warning: `java_lookup_type' defined but not used src/gdb/m32r-rom.c:406: warning: `m32r_set_board_address' defined but not used src/gdb/m32r-rom.c:425: warning: `m32r_set_server_address' defined but not used src/gdb/m32r-rom.c:444: warning: `m32r_set_download_path' defined but not used src/gdb/monitor.c:1520: warning: `monitor_write_even_block' defined but not used src/gdb/remote-fileio.c:368: warning: `remote_fileio_to_fio_int' defined but not used src/gdb/remote-mips.c:2435: warning: `remote_mips_insert_hw_breakpoint' defined but not used src/gdb/remote-mips.c:2448: warning: `remote_mips_remove_hw_breakpoint' defined but not used src/gdb/remote-mips.c:606: warning: `mips_getstring' defined but not used src/gdb/remote-rdi.c:142: warning: `arm_rdi_start_remote' defined but not used src/gdb/remote-rdi.c:491: warning: `arm_rdi_interrupt' defined but not used src/gdb/remote-rdi.c:499: warning: `arm_rdi_interrupt_twice' defined but not used src/gdb/remote-rdi.c:506: warning: `interrupt_query' defined but not used src/gdb/remote-rdi.c:79: warning: `arm_rdi_mourn' declared `static' but never defined src/gdb/remote-rdi.c:81: warning: `arm_rdi_send' declared `static' but never defined src/gdb/rs6000-tdep.c:2056: warning: `rs6000_pc_in_call_dummy' defined but not used src/gdb/s390-tdep.c:1571: warning: `s390_function_start' defined but not used src/gdb/source.c:83: warning: `ambiguous_line_spec' declared `static' but never defined ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 2004-01-19 18:31 ` Andrew Cagney @ 2004-01-19 23:14 ` Kevin Buettner 2004-01-19 23:21 ` Kevin Buettner 1 sibling, 0 replies; 9+ messages in thread From: Kevin Buettner @ 2004-01-19 23:14 UTC (permalink / raw) To: gdb-patches On Mon, 19 Jan 2004 13:31:23 -0500 Andrew Cagney <cagney@gnu.org> wrote: > Here's this week's list. It's noticably shorter, and core-GDB items > still remaining have been figured out. Again, can I encourage > architecture maintainers to check this out. I've taken care of the unused declarations in frv-tdep.c. I've just committed the following patch: * frv-tdep.c (frv_push_arguments, frv_saved_pc_after_call): Delete unused declarations. Index: frv-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/frv-tdep.c,v retrieving revision 1.66 diff -u -p -r1.66 frv-tdep.c --- frv-tdep.c 17 Jan 2004 15:34:11 -0000 1.66 +++ frv-tdep.c 19 Jan 2004 23:09:18 -0000 @@ -44,8 +44,6 @@ static gdbarch_breakpoint_from_pc_ftype static gdbarch_adjust_breakpoint_address_ftype frv_gdbarch_adjust_breakpoint_address; static gdbarch_skip_prologue_ftype frv_skip_prologue; static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation; -static gdbarch_deprecated_push_arguments_ftype frv_push_arguments; -static gdbarch_deprecated_saved_pc_after_call_ftype frv_saved_pc_after_call; /* Register numbers. The order in which these appear define the remote protocol, so take care in changing them. */ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 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 1 sibling, 1 reply; 9+ messages in thread From: Kevin Buettner @ 2004-01-19 23:21 UTC (permalink / raw) To: J. Johnston; +Cc: gdb-patches 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. Thanks, Kevin ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [obish] -Wunused-function warnings 2004-01-19 23:21 ` Kevin Buettner @ 2004-02-03 22:23 ` Andrew Cagney 0 siblings, 0 replies; 9+ messages in thread From: Andrew Cagney @ 2004-02-03 22:23 UTC (permalink / raw) To: Kevin Buettner; +Cc: J. Johnston, gdb-patches [-- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-02-03 22:23 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-01-11 18:26 [obish] -Wunused-function warnings 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox