Make a bunch of functions static
All these functions are only used in their respective files, they are missing the static keyword, add them. gdb/ChangeLog: * arc-tdep.c (arc_insn_get_memory_base_reg): Make static. (arc_insn_get_memory_offset): Likewise. (arc_insn_dump): Likewise. * cp-support.c (test_cp_symbol_name_matches): Likewise. * csky-linux-tdep.c (csky_supply_fregset): Likewise. * dictionary.c (dict_iterator_next): Likewise. (dict_iter_match_first): Likewise. (dict_iter_match_next): Likewise. * f-lang.c (evaluate_subexp_f): Likewise. * hppa-tdep.c (hppa_read_pc): Likewise. * i386-tdep.c (i386_floatformat_for_type): Likewise. * parse.c (write_exp_elt_msym): Likewise. * ppc-linux-tdep.c (ppc_floatformat_for_type): Likewise. * remote.c (remote_packet_size): Likewise. (remote_notif_stop_parse): Likewise. * rs6000-aix-tdep.c (aix_sighandle_frame_sniffer): Likewise. * s12z-tdep.c (s12z_disassemble_info): Likewise. * source.c (prepare_path_for_appending): Likewise. * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault); Likewise. * stack.c (frame_selection_by_function_completer): Likewise. Change-Id: I18e187ad279075b961e3e22e5b034f5c0f6188f0
This commit is contained in:
parent
781597ff9a
commit
cb8c24b661
16 changed files with 46 additions and 21 deletions
|
@ -1,3 +1,27 @@
|
||||||
|
2019-11-26 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
|
* arc-tdep.c (arc_insn_get_memory_base_reg): Make static.
|
||||||
|
(arc_insn_get_memory_offset): Likewise.
|
||||||
|
(arc_insn_dump): Likewise.
|
||||||
|
* cp-support.c (test_cp_symbol_name_matches): Likewise.
|
||||||
|
* csky-linux-tdep.c (csky_supply_fregset): Likewise.
|
||||||
|
* dictionary.c (dict_iterator_next): Likewise.
|
||||||
|
(dict_iter_match_first): Likewise.
|
||||||
|
(dict_iter_match_next): Likewise.
|
||||||
|
* f-lang.c (evaluate_subexp_f): Likewise.
|
||||||
|
* hppa-tdep.c (hppa_read_pc): Likewise.
|
||||||
|
* i386-tdep.c (i386_floatformat_for_type): Likewise.
|
||||||
|
* parse.c (write_exp_elt_msym): Likewise.
|
||||||
|
* ppc-linux-tdep.c (ppc_floatformat_for_type): Likewise.
|
||||||
|
* remote.c (remote_packet_size): Likewise.
|
||||||
|
(remote_notif_stop_parse): Likewise.
|
||||||
|
* rs6000-aix-tdep.c (aix_sighandle_frame_sniffer): Likewise.
|
||||||
|
* s12z-tdep.c (s12z_disassemble_info): Likewise.
|
||||||
|
* source.c (prepare_path_for_appending): Likewise.
|
||||||
|
* sparc64-linux-tdep.c
|
||||||
|
(sparc64_linux_handle_segmentation_fault); Likewise.
|
||||||
|
* stack.c (frame_selection_by_function_completer): Likewise.
|
||||||
|
|
||||||
2019-11-26 Simon Marchi <simon.marchi@efficios.com>
|
2019-11-26 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
* completer.c (set_gdb_completion_word_break_characters):
|
* completer.c (set_gdb_completion_word_break_characters):
|
||||||
|
|
|
@ -208,7 +208,7 @@ arc_insn_get_operand_value_signed (const struct arc_instruction &insn,
|
||||||
|
|
||||||
/* Get register with base address of memory operation. */
|
/* Get register with base address of memory operation. */
|
||||||
|
|
||||||
int
|
static int
|
||||||
arc_insn_get_memory_base_reg (const struct arc_instruction &insn)
|
arc_insn_get_memory_base_reg (const struct arc_instruction &insn)
|
||||||
{
|
{
|
||||||
/* POP_S and PUSH_S have SP as an implicit argument in a disassembler. */
|
/* POP_S and PUSH_S have SP as an implicit argument in a disassembler. */
|
||||||
|
@ -227,7 +227,7 @@ arc_insn_get_memory_base_reg (const struct arc_instruction &insn)
|
||||||
|
|
||||||
/* Get offset of a memory operation INSN. */
|
/* Get offset of a memory operation INSN. */
|
||||||
|
|
||||||
CORE_ADDR
|
static CORE_ADDR
|
||||||
arc_insn_get_memory_offset (const struct arc_instruction &insn)
|
arc_insn_get_memory_offset (const struct arc_instruction &insn)
|
||||||
{
|
{
|
||||||
/* POP_S and PUSH_S have offset as an implicit argument in a
|
/* POP_S and PUSH_S have offset as an implicit argument in a
|
||||||
|
@ -334,7 +334,7 @@ arc_insn_get_branch_target (const struct arc_instruction &insn)
|
||||||
|
|
||||||
/* Dump INSN into gdb_stdlog. */
|
/* Dump INSN into gdb_stdlog. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
arc_insn_dump (const struct arc_instruction &insn)
|
arc_insn_dump (const struct arc_instruction &insn)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = target_gdbarch ();
|
struct gdbarch *gdbarch = target_gdbarch ();
|
||||||
|
|
|
@ -1810,7 +1810,7 @@ cp_get_symbol_name_matcher (const lookup_name_info &lookup_name)
|
||||||
|
|
||||||
namespace selftests {
|
namespace selftests {
|
||||||
|
|
||||||
void
|
static void
|
||||||
test_cp_symbol_name_matches ()
|
test_cp_symbol_name_matches ()
|
||||||
{
|
{
|
||||||
#define CHECK_MATCH(SYMBOL, INPUT) \
|
#define CHECK_MATCH(SYMBOL, INPUT) \
|
||||||
|
|
|
@ -106,7 +106,7 @@ csky_collect_gregset (const struct regset *regset,
|
||||||
|
|
||||||
/* Implement the supply_regset hook for FP registers in core files. */
|
/* Implement the supply_regset hook for FP registers in core files. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
csky_supply_fregset (const struct regset *regset,
|
csky_supply_fregset (const struct regset *regset,
|
||||||
struct regcache *regcache, int regnum,
|
struct regcache *regcache, int regnum,
|
||||||
const void *regs, size_t len)
|
const void *regs, size_t len)
|
||||||
|
|
|
@ -465,7 +465,7 @@ dict_add_pending (struct dictionary *dict,
|
||||||
/* Initialize ITERATOR to point at the first symbol in DICT, and
|
/* Initialize ITERATOR to point at the first symbol in DICT, and
|
||||||
return that first symbol, or NULL if DICT is empty. */
|
return that first symbol, or NULL if DICT is empty. */
|
||||||
|
|
||||||
struct symbol *
|
static struct symbol *
|
||||||
dict_iterator_first (const struct dictionary *dict,
|
dict_iterator_first (const struct dictionary *dict,
|
||||||
struct dict_iterator *iterator)
|
struct dict_iterator *iterator)
|
||||||
{
|
{
|
||||||
|
@ -475,14 +475,14 @@ dict_iterator_first (const struct dictionary *dict,
|
||||||
/* Advance ITERATOR, and return the next symbol, or NULL if there are
|
/* Advance ITERATOR, and return the next symbol, or NULL if there are
|
||||||
no more symbols. */
|
no more symbols. */
|
||||||
|
|
||||||
struct symbol *
|
static struct symbol *
|
||||||
dict_iterator_next (struct dict_iterator *iterator)
|
dict_iterator_next (struct dict_iterator *iterator)
|
||||||
{
|
{
|
||||||
return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
|
return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
|
||||||
->iterator_next (iterator);
|
->iterator_next (iterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct symbol *
|
static struct symbol *
|
||||||
dict_iter_match_first (const struct dictionary *dict,
|
dict_iter_match_first (const struct dictionary *dict,
|
||||||
const lookup_name_info &name,
|
const lookup_name_info &name,
|
||||||
struct dict_iterator *iterator)
|
struct dict_iterator *iterator)
|
||||||
|
@ -490,7 +490,7 @@ dict_iter_match_first (const struct dictionary *dict,
|
||||||
return (DICT_VECTOR (dict))->iter_match_first (dict, name, iterator);
|
return (DICT_VECTOR (dict))->iter_match_first (dict, name, iterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct symbol *
|
static struct symbol *
|
||||||
dict_iter_match_next (const lookup_name_info &name,
|
dict_iter_match_next (const lookup_name_info &name,
|
||||||
struct dict_iterator *iterator)
|
struct dict_iterator *iterator)
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,7 +243,8 @@ f_collect_symbol_completion_matches (completion_tracker &tracker,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special expression evaluation cases for Fortran. */
|
/* Special expression evaluation cases for Fortran. */
|
||||||
struct value *
|
|
||||||
|
static struct value *
|
||||||
evaluate_subexp_f (struct type *expect_type, struct expression *exp,
|
evaluate_subexp_f (struct type *expect_type, struct expression *exp,
|
||||||
int *pos, enum noside noside)
|
int *pos, enum noside noside)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ hppa64_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||||
return align_up (addr, 16);
|
return align_up (addr, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ADDR
|
static CORE_ADDR
|
||||||
hppa_read_pc (readable_regcache *regcache)
|
hppa_read_pc (readable_regcache *regcache)
|
||||||
{
|
{
|
||||||
ULONGEST ipsw;
|
ULONGEST ipsw;
|
||||||
|
|
|
@ -8177,7 +8177,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||||
length LEN in bits. If non-NULL, NAME is the name of its type.
|
length LEN in bits. If non-NULL, NAME is the name of its type.
|
||||||
If no suitable type is found, return NULL. */
|
If no suitable type is found, return NULL. */
|
||||||
|
|
||||||
const struct floatformat **
|
static const struct floatformat **
|
||||||
i386_floatformat_for_type (struct gdbarch *gdbarch,
|
i386_floatformat_for_type (struct gdbarch *gdbarch,
|
||||||
const char *name, int len)
|
const char *name, int len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -181,7 +181,7 @@ write_exp_elt_sym (struct expr_builder *ps, struct symbol *expelt)
|
||||||
write_exp_elt (ps, &tmp);
|
write_exp_elt (ps, &tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
write_exp_elt_msym (struct expr_builder *ps, minimal_symbol *expelt)
|
write_exp_elt_msym (struct expr_builder *ps, minimal_symbol *expelt)
|
||||||
{
|
{
|
||||||
union exp_element tmp;
|
union exp_element tmp;
|
||||||
|
|
|
@ -1961,7 +1961,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
|
||||||
length LEN in bits. If non-NULL, NAME is the name of its type.
|
length LEN in bits. If non-NULL, NAME is the name of its type.
|
||||||
If no suitable type is found, return NULL. */
|
If no suitable type is found, return NULL. */
|
||||||
|
|
||||||
const struct floatformat **
|
static const struct floatformat **
|
||||||
ppc_floatformat_for_type (struct gdbarch *gdbarch,
|
ppc_floatformat_for_type (struct gdbarch *gdbarch,
|
||||||
const char *name, int len)
|
const char *name, int len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5056,7 +5056,7 @@ remote_target::remote_packet_size (const protocol_feature *feature,
|
||||||
rs->explicit_packet_size = packet_size;
|
rs->explicit_packet_size = packet_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
remote_packet_size (remote_target *remote, const protocol_feature *feature,
|
remote_packet_size (remote_target *remote, const protocol_feature *feature,
|
||||||
enum packet_support support, const char *value)
|
enum packet_support support, const char *value)
|
||||||
{
|
{
|
||||||
|
@ -6826,7 +6826,7 @@ remote_target::stop_reply_queue_length ()
|
||||||
return rs->stop_reply_queue.size ();
|
return rs->stop_reply_queue.size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
remote_notif_stop_parse (remote_target *remote,
|
remote_notif_stop_parse (remote_target *remote,
|
||||||
struct notif_client *self, const char *buf,
|
struct notif_client *self, const char *buf,
|
||||||
struct notif_event *event)
|
struct notif_event *event)
|
||||||
|
|
|
@ -141,7 +141,7 @@ aix_sighandle_frame_prev_register (struct frame_info *this_frame,
|
||||||
return trad_frame_get_register (this_trad_cache, this_frame, regnum);
|
return trad_frame_get_register (this_trad_cache, this_frame, regnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
aix_sighandle_frame_sniffer (const struct frame_unwind *self,
|
aix_sighandle_frame_sniffer (const struct frame_unwind *self,
|
||||||
struct frame_info *this_frame,
|
struct frame_info *this_frame,
|
||||||
void **this_prologue_cache)
|
void **this_prologue_cache)
|
||||||
|
|
|
@ -147,7 +147,7 @@ s12z_fprintf_disasm (void *stream, const char *format, ...)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct disassemble_info
|
static struct disassemble_info
|
||||||
s12z_disassemble_info (struct gdbarch *gdbarch)
|
s12z_disassemble_info (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
struct disassemble_info di;
|
struct disassemble_info di;
|
||||||
|
|
|
@ -679,7 +679,7 @@ info_source_command (const char *ignore, int from_tty)
|
||||||
letters (for dos) as well as leading '/' characters and './'
|
letters (for dos) as well as leading '/' characters and './'
|
||||||
sequences. */
|
sequences. */
|
||||||
|
|
||||||
const char *
|
static const char *
|
||||||
prepare_path_for_appending (const char *path)
|
prepare_path_for_appending (const char *path)
|
||||||
{
|
{
|
||||||
/* For dos paths, d:/foo -> /foo, and d:foo -> foo. */
|
/* For dos paths, d:/foo -> /foo, and d:foo -> foo. */
|
||||||
|
|
|
@ -120,7 +120,7 @@ sparc64_linux_sigframe_init (const struct tramp_frame *self,
|
||||||
gdbarch hook.
|
gdbarch hook.
|
||||||
Displays information related to ADI memory corruptions. */
|
Displays information related to ADI memory corruptions. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
sparc64_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
|
sparc64_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
|
||||||
struct ui_out *uiout)
|
struct ui_out *uiout)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1432,7 +1432,7 @@ print_frame (const frame_print_options &fp_opts,
|
||||||
/* Completion function for "frame function", "info frame function", and
|
/* Completion function for "frame function", "info frame function", and
|
||||||
"select-frame function" commands. */
|
"select-frame function" commands. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
frame_selection_by_function_completer (struct cmd_list_element *ignore,
|
frame_selection_by_function_completer (struct cmd_list_element *ignore,
|
||||||
completion_tracker &tracker,
|
completion_tracker &tracker,
|
||||||
const char *text, const char *word)
|
const char *text, const char *word)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue