aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog537
-rw-r--r--gdb/Makefile.in28
-rw-r--r--gdb/alpha-nat.c2
-rw-r--r--gdb/alpha-tdep.c11
-rw-r--r--gdb/annotate.c1
-rw-r--r--gdb/arc-tdep.c2
-rw-r--r--gdb/bcache.c3
-rw-r--r--gdb/breakpoint.c55
-rw-r--r--gdb/c-lang.c2
-rw-r--r--gdb/callback.c59
-rw-r--r--gdb/ch-exp.c84
-rw-r--r--gdb/ch-lang.c20
-rw-r--r--gdb/ch-lang.h3
-rw-r--r--gdb/ch-valprint.c13
-rw-r--r--gdb/core-aout.c3
-rw-r--r--gdb/corelow.c4
-rw-r--r--gdb/dbxread.c10
-rw-r--r--gdb/dcache.c10
-rw-r--r--gdb/defs.h44
-rw-r--r--gdb/demangle.c5
-rw-r--r--gdb/dwarfread.c3
-rw-r--r--gdb/exec.c4
-rw-r--r--gdb/f-exp.y4
-rw-r--r--gdb/f-lang.c132
-rw-r--r--gdb/f-typeprint.c4
-rw-r--r--gdb/f-valprint.c35
-rw-r--r--gdb/gdb_string.h28
-rw-r--r--gdb/gdbtk.c48
-rw-r--r--gdb/gdbtypes.c27
-rw-r--r--gdb/gdbtypes.h4
-rw-r--r--gdb/hp300ux-nat.c11
-rw-r--r--gdb/i386ly-tdep.c1
-rw-r--r--gdb/i960-tdep.c1
-rw-r--r--gdb/infcmd.c13
-rw-r--r--gdb/inflow.c9
-rw-r--r--gdb/infrun.c44
-rw-r--r--gdb/language.c25
-rw-r--r--gdb/m2-lang.c5
-rw-r--r--gdb/m2-valprint.c1
-rw-r--r--gdb/mac-nat.c4
-rw-r--r--gdb/maint.c8
-rw-r--r--gdb/mdebugread.c18
-rw-r--r--gdb/nindy-tdep.c1
-rw-r--r--gdb/objfiles.c59
-rw-r--r--gdb/objfiles.h3
-rw-r--r--gdb/os9kread.c4
-rw-r--r--gdb/procfs.c54
-rw-r--r--gdb/remote-e7000.c2
-rw-r--r--gdb/remote-utils.c5
-rw-r--r--gdb/remote.c12
-rw-r--r--gdb/rs6000-tdep.c2
-rw-r--r--gdb/scm-exp.c17
-rw-r--r--gdb/scm-lang.c14
-rw-r--r--gdb/scm-lang.h4
-rw-r--r--gdb/scm-valprint.c27
-rw-r--r--gdb/ser-tcp.c4
-rw-r--r--gdb/ser-unix.c8
-rw-r--r--gdb/serial.c3
-rw-r--r--gdb/serial.h2
-rw-r--r--gdb/sparc-nat.c3
-rw-r--r--gdb/stabsread.c11
-rw-r--r--gdb/stabsread.h6
-rw-r--r--gdb/symfile.c4
-rw-r--r--gdb/symtab.c106
-rw-r--r--gdb/thread.c24
-rw-r--r--gdb/top.c24
-rw-r--r--gdb/utils.c12
-rw-r--r--gdb/valops.c7
-rw-r--r--gdb/valprint.c71
-rw-r--r--gdb/valprint.h3
-rw-r--r--gdb/values.c2
-rw-r--r--gdb/w65-tdep.c2
-rw-r--r--gdb/win32-nat.c4
-rw-r--r--gdb/z8k-tdep.c1
74 files changed, 1460 insertions, 366 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f626710..11bb2dd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,540 @@
+Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (scm-valprint.o): Depends upon gdbcore_h.
+ (arm-tdep.o): Ditto.
+ (dcache.o): Ditto.
+ (i386ly-tdep.o): Ditto.
+ (i960-tdep.o): Ditto.
+ (m68k-tdep.o): Ditto.
+ (nindy-tdep.o): Ditto.
+ (scm-lang.o): Ditto.
+ (w65-tdep.o): Ditto.
+ (z8k-tdep.o): Ditto.
+ (m68k-tdep.o): Depends upon value_h and gdb_string.h
+ (m2-valprint.o): Depends upon m2-lang.h.
+ (sparc-tdep.o): Depends upon gdb_string.h
+ (valprint.o): Depends upon valprint.h
+
+ * remote-e7000.c (notice_quit): Remove prototype.
+ * top.c (initialize_targets): Remove prototype, now in target.h.
+ * stabsread.c (resolve_cfront_continuation): Remove prototype.
+ * dbxread.c (resolve_cfront_continuation): Remove prototype.
+ * symfile.h (set_demangling_style): Remove prototype.
+ * config/tm-sysv4.h (in_plt_section): Remove prototype, in objfiles.h.
+ * config/sparc/tm-sparc.h (single_step): Remove extern decl, now in
+ target.h.
+ * config/arc/tm-arc.h (one_stepped, single_step): Remove extern decls,
+ now in target.h.
+ * ser-unix.c (hardwire_restore): Remove obsolete prototype.
+ * sparc-tdep.c (single_step): Remove forward decl of isbranch.
+ * scm-lang.c (find_function_in_inferior): Remove prototype.
+ (value_allocate_space_in_inferior): Ditto.
+ * infrun.c (write_pc_pid): Remove prototype, now in inferior.h.
+ * defs.h (strchr): Remove declarations, they are declared in
+ gdb_string.h also.
+ (strrchr): Ditto.
+ (strstr): Ditto.
+ (strtok): Ditto.
+ (strerror): Ditto.
+ * f-valprint.c (f77_print_array_1): Remove extra arg that was being
+ passed to f77_print_array_1.
+ * gdbtk.c (register_changed_p): Remove unused local variable "buf".
+ * gdbtypes.c (add_name): Remove unused variables lenstrlen and lenstr.
+ * scm-exp.c (scm_istr2int): Remove unused variable "j".
+ (scm_parse): Remove unused variable "str".
+ * hp300ux-nat.c (store_inferior_register): Remove unused variable
+ "buf".
+ (store_inferior_registers): Remove unnecessary decl "registers".
+ * m68k-tdep.c (m68k_pop_frame): Remove unused variable "fi".
+ * scm-lang.c (scm_get_field): Remove unused variable "val".
+ (scm_lookup_name): Remove unused variable "symval".
+ * objfiles.c (map_to_file): Remove unused local variable "tempfd".
+ * procfs.c (do_attach, do_detach): Remove unused variable "result".
+ (last_resume_pid): Remove unused static variable.
+ * alpha-tdep.c (alpha_linux_sigtramp_offset): Remove unused variable
+ "res".
+ * objfiles.c (map_to_address): Remove unused function.
+ * f-valprint.c (print_max): Remove extraneous extern decl,
+ in valprint.h.
+ (calc_f77_array_dims): Remove extraneous prototype, in f-lang.h.
+ * ch-exp.c (write_lower_upper_value): Remove prototype for
+ type_lower_upper.
+
+ * gdbtypes.c (cfront_mangle_name): #ifdef out unused function.
+ * ch-exp.c (parse_mode_call): Ditto.
+ * f-valprint.c (there_is_a_visible_common_named): Ditto.
+ * f-lang.c (clear_function_list): Ditto.
+ (get_bf_for_fcn): Ditto.
+ (clear_bf_list): Ditto.
+ (add_common_block): Ditto.
+ (patch_all_commons_by_name): Ditto.
+ (find_first_common_named): Ditto.
+ (add_common_entry): Ditto.
+ (allocate_saved_function_node): Ditto.
+ (allocate_saved_bf_node): Ditto.
+ (allocate_common_entry_node): Ditto.
+ (allocate_saved_f77_common_node): Ditto.
+
+ * arm-tdep.c (gdbcore.h): Include for necessary prototypes.
+ * dcache.c (gdbcore.h): Ditto.
+ * i386ly-tdep.c (gdbcore.h): Ditto.
+ * i960-tdep.c (gdbcore.h): Ditto.
+ * m2-valprint.c (m2-lang.h): Ditto.
+ * m68k-tdep.c (gdbcore.h): Ditto.
+ (value.h): Ditto.
+ (gdb_string.h): Ditto.
+ * nindy-tdep.c (gdbcore.h): Ditto.
+ * scm-lang.c (gdbcore.h): Ditto.
+ * scm-valprint.c (gdbcore.h): Ditto.
+ * w65-tdep.c (gdbcore.h): Ditto.
+ * z8k-tdep.c (gdbcore.h): Ditto.
+ * sparc-tdep.c (gdb_string.h): Include.
+ * valprint.c (valprint.h): Include.
+
+ * config/xm-lynx.h: Remove part of comment about INT_MIN
+ redefined warnings from defs.h, since INT_MIN define in
+ defs.h is now protected by #ifndef INT_MIN.
+ * config/i386/xm-i386bsd.h: Ditto.
+ * config/m68k/xm-hp300bsd.h: Ditto.
+ * config/m68k/xm-news.h: Ditto.
+
+ * config/pa/xm-hppah.h (INT_MIN): Remove bogus INT_MIN
+ definition as 0x80000000. The macro in defs.h is better.
+ * config/i386/xm-i386m3.h (INT_MIN): Ditto.
+ * config/i386/xm-i386mach.h (INT_MIN): Ditto.
+ * config/ns32k/xm-ns32km3.h (INT_MIN): Ditto.
+ * config/pa/xm-hppab.h: Ditto.
+
+ * core-aout.c (fetch_core_registers): Add prototype.
+ * hp300ux-nat.c (fetch_inferior_register): Ditto.
+ (store_inferior_register_1): Ditto.
+ (store_inferior_register): Ditto.
+ * config/m68k/tm-m68k.h (find_saved_regs): Ditto.
+ *scm-valprint.c (c_val_print): Ditto.
+ * procfs.c (add_fd): Ditto.
+ (remove_fd): Ditto.
+ (wait_fd): Ditto.
+ (sigcodename): Ditto.
+ (sigcodedesc): Ditto.
+ (procfs_kill_inferior): Ditto.
+ (procfs_xfer_memory): Ditto.
+ (procfs_store_registers): Ditto.
+ (create_procinfo): Ditto.
+ (procfs_init_inferior): Ditto.
+ (proc_set_exec_trap): Ditto.
+ (procfs_attach): Ditto.
+ (procfs_detach): Ditto.
+ (procfs_prepare_to_store): Ditto.
+ (procfs_files_info): Ditto.
+ (procfs_open): Ditto.
+ (procfs_wait): Ditto.
+ (procfs_fetch_registers): Ditto.
+ (procfs_mourn_inferior): Ditto.
+ (procfs_can_run): Ditto.
+ (procfs_thread_alive): Ditto.
+ (procfs_stop): Ditto.
+ * alpha-nat.c (fetch_core_registers): Ditto.
+ * config/alpha/tm-alpha.h (alpha_osf_skip_sigtramp_frame): Ditto.
+ * objfiles.c (ecoff_relocate_efi): Ditto.
+ * inflow.c (pass_signal): Ditto.
+ (handle_sigio): Ditto.
+ * annotate.c (breakpoint_changed): Ditto.
+ * callback.c (wrap): Ditto.
+ (fdbad): Ditto.
+ (fdmap): Ditto.
+ * utils.c (malloc_botch): Ditto.
+ (fputs_maybe_filtered): Ditto.
+ (vfprintf_maybe_filtered): Ditto.
+ * defs.h (notice_quit): Ditto.
+ * defs.h (xmalloc, xrealloc): Ditto.
+ * top.c (stop_sig): Ditto.
+ (init_signals): Ditto.
+ (user_defined_command): Ditto.
+ (source_cleanup_lines): Ditto.
+ (dont_repeat_command): Ditto.
+ (serial_log_command): Ditto.
+ (disconnect): Ditto.
+ * target.h (initialize_targets): Ditto.
+ * os9kread.c (read_minimal_symbols): Ditto.
+ * mdebugread.c (mdebug_psymtab_to_symtab): Ditto.
+ (fdr_name): Ditto.
+ (push_parse_stack): Ditto.
+ (pop_parse_stack): Ditto.
+ (is_pending_symbol): Ditto.
+ (add_pending): Ditto.
+ * serial.c (serial_logchar): Ditto.
+ (serial_interface_lookup): Ditto.
+ * serial.h (serial_log_command): Ditto.
+ * f-valprint.c (info_common_command): Ditto.
+ * gdbtypes.h (print_type_scalar): Ditto.
+ * scm-valprint.c (scm_scmlist_print): Ditto.
+ (scm_ipruk): Ditto.
+ * scm-lang.c (scm_printstr): Ditto.
+ (in_eval_c): Ditto.
+ (evaluate_subexp_scm): Ditto.
+ * scm-exp.c (scm_read_token): Ditto.
+ (scm_skip_ws): Ditto.
+ (scm_lreadparen): Ditto.
+ * m2-lang.c (emit_char): Ditto.
+ (m2_printchar): Ditto.
+ (m2_printstr): Ditto.
+ (m2_create_fundamental_type): Ditto.
+ * f-lang.c (emit_char): Ditto.
+ (f_printchar): Ditto.
+ (f_printstr): Ditto.
+ (f_create_fundamental_type): Ditto.
+ * ch-lang.c (chill_printchar): Ditto.
+ (chill_printstr): Ditto.
+ (chill_create_fundamental_type): Ditto.
+ (value_chill_length): Ditto.
+ (value_chill_card): Ditto.
+ (value_chill_max_min): Ditto.
+ (evaluate_subexp_chill): Ditto.
+ * ch-exp.c (PEEK_TOKEN): Ditto.
+ (peek_token_): Ditto.
+ (forward_token_): Ditto.
+ (parse_case_label): Ditto.
+ (parse_opt_untyped_expr): Ditto.
+ (parse_unary_call): Ditto.
+ (parse_call): Ditto.
+ (parse_named_record_element): Ditto.
+ (parse_tuple_element): Ditto.
+ (parse_opt_element_list): Ditto.
+ (parse_tuple): Ditto.
+ (parse_primval): Ditto.
+ (parse_operand6): Ditto.
+ (parse_operand5): Ditto.
+ (parse_operand4): Ditto.
+ (parse_operand3): Ditto.
+ (parse_operand2): Ditto.
+ (parse_operand1): Ditto.
+ (parse_operand0): Ditto.
+ (parse_expr): Ditto.
+ (parse_then_alternative): Ditto.
+ (parse_else_alternative): Ditto.
+ (parse_if_expression): Ditto.
+ (parse_untyped_expr): Ditto.
+ (growbuf_by_size): Ditto.
+ (match_simple_name_string): Ditto.
+ (decode_integer_value): Ditto.
+ (decode_integer_literal): Ditto.
+ (match_float_literal): Ditto.
+ (match_float_literal): Ditto.
+ (match_string_literal): Ditto.
+ (match_character_literal): Ditto.
+ (match_integer_literal): Ditto.
+ (match_bitstring_literal): Ditto.
+ (write_lower_upper_value): Ditto.
+ * ch-lang.h (type_lower_upper): Ditto.
+ * c-lang.c (emit_char): Ditto.
+ * dwarfread.c (free_utypes): Ditto.
+ * stabsread.h (resolve_cfront_continuation): Ditto.
+ * stabsread.c (get_substring): Ditto.
+ (read_one_struct_field): Ditto.
+ * stabsread.h (process_later): Ditto.
+ * demangle.c (set_demangling_command): Ditto.
+ * defs.h (set_demangling_style): Ditto.
+ * maint.c (maintenance_info_command): Ditto.
+ (print_section_table): Ditto.
+ (maintenance_info_sections): Ditto.
+ (maintenance_print_command): Ditto.
+ * symtab.h (maintenance_print_statistics): Ditto.
+ * objfiles.h (in_plt_section): Ditto.
+ * objfiles.c (add_to_objfile_sections): Ditto.
+ * bcache.c (hash): Ditto.
+ (lookup_cache): Ditto.
+ * exec.c (bfdsec_to_vmap): Ditto.
+ (ignore): Ditto.
+ * f-exp.y (growbuf_by_size, match_string_literal): Ditto.
+ * language.c (unk_lang_printchar): Ditto.
+ (unk_lang_printstr): Ditto.
+ (unk_lang_create_fundamental_type): Ditto.
+ (unk_lang_print_type): Ditto.
+ (unk_lang_val_print): Ditto.
+ (unk_lang_value_print): Ditto.
+ * target.c (update_current_target): Ditto.
+ (debug_to_open): Ditto.
+ (debug_to_close): Ditto.
+ (debug_to_attach): Ditto.
+ (debug_to_detach): Ditto.
+ (debug_to_resume): Ditto.
+ (debug_to_wait): Ditto.
+ (debug_to_fetch_registers): Ditto.
+ (debug_to_store_registers): Ditto.
+ (debug_to_prepare_to_store): Ditto.
+ (debug_to_xfer_memory): Ditto.
+ (debug_to_files_info): Ditto.
+ (debug_to_insert_breakpoint): Ditto.
+ (debug_to_remove_breakpoint): Ditto.
+ (debug_to_terminal_init): Ditto.
+ (debug_to_terminal_inferior): Ditto.
+ (debug_to_terminal_ours_for_output): Ditto.
+ (debug_to_terminal_ours): Ditto.
+ (debug_to_terminal_info): Ditto.
+ (debug_to_kill): Ditto.
+ (debug_to_load): Ditto.
+ (debug_to_lookup_symbol): Ditto.
+ (debug_to_create_inferior): Ditto.
+ (debug_to_mourn_inferior): Ditto.
+ (debug_to_can_run): Ditto.
+ (debug_to_notice_signals): Ditto.
+ (debug_to_thread_alive): Ditto.
+ (debug_to_stop): Ditto.
+ * gdbtk.c (null_routine): Ditto.
+ (gdbtk_flush): Ditto.
+ (gdbtk_fputs): Ditto.
+ (gdbtk_query): Ditto.
+ (gdbtk_readline): Ditto.
+ (gdbtk_readline_end): Ditto.
+ (gdb_get_breakpoint_list): Ditto.
+ (gdb_get_breakpoint_info): Ditto.
+ (breakpoint_notify): Ditto.
+ (gdbtk_create_breakpoint): Ditto.
+ (gdbtk_delete_breakpoint): Ditto.
+ (gdbtk_modify_breakpoint): Ditto.
+ (gdb_loc): Ditto.
+ (gdb_eval): Ditto.
+ (gdb_sourcelines): Ditto.
+ (map_arg_registers): Ditto.
+ (get_register_name): Ditto.
+ (gdb_regnames): Ditto.
+ (get_register): Ditto.
+ (gdb_fetch_registers): Ditto.
+ (register_changed_p): Ditto.
+ (gdb_changed_register_list): Ditto.
+ (gdb_cmd): Ditto.
+ (call_wrapper): Ditto.
+ (gdb_listfiles): Ditto.
+ (gdb_stop): Ditto.
+ (gdbtk_dis_asm_read_memory): Ditto.
+ (compare_lines): Ditto.
+ (gdb_disassemble): Ditto.
+ (tk_command): Ditto.
+ (cleanup_init): Ditto.
+ (gdbtk_interactive): Ditto.
+ (x_event): Ditto.
+ (gdbtk_wait): Ditto.
+ (gdbtk_call_command): Ditto.
+ (tk_command_loop): Ditto.
+ (gdbtk_init): Ditto.
+ * breakpoint.h (set_breakpoint_sal): Ditto.
+ * remote-utils.c (usage): Ditto.
+ * remote.c (set_thread): Ditto.
+ (remote_thread_alive): Ditto.
+ (get_offsets): Ditto.
+ (read_frame): Ditto.
+ (remote_insert_breakpoint): Ditto.
+ (remote_remove_breakpoint): Ditto.
+ * sparc-nat.c (fetch_core_registers): Ditto.
+ * corelow.c (add_to_thread_list): Ditto.
+ (ignore): Ditto.
+ * inftarg.c (proc_wait): Ditto.
+ * infptrace.c (udot_info): Ditto.
+ (fetch_register): Ditto.
+ * ser-unix.c (hardwire_noflush_set_tty_state): Ditto.
+ (hardwire_print_tty_state): Ditto.
+ (hardwire_flush_output): Ditto.
+ (hardwire_flush_input): Ditto.
+ (hardwire_send_break): Ditto.
+ (hardwire_setstopbits): Ditto.
+ * ser-tcp.c (tcp_return_0): Ditto.
+ (tcp_noflush_set_tty_state): Ditto.
+ (tcp_print_tty_state): Ditto.
+ * solib.c (match_main): Ditto.
+ * gdbtypes.c (print_bit_vector): Ditto.
+ (print_arg_types): Ditto.
+ (dump_fn_fieldlists): Ditto.
+ (print_cplus_stuff): Ditto.
+ * symfile.h (entry_point_address): Ditto.
+ * symfile.c (decrement_reading_symtab): Ditto.
+ * valops.c (value_arg_coerce): Ditto.
+ * value.h (find_function_in_inferior): Ditto.
+ (value_allocate_space_in_inferior): Ditto.
+ * values.c (vb_match): Ditto.
+ * thread.c (info_thread_command): Ditto.
+ (restore_current_thread): Ditto.
+ (thread_apply_all_command): Ditto.
+ (thread_apply_command): Ditto.
+ * inferior.h (write_pc_pid): Ditto.
+ * infrun.c (delete_breakpoint_current_contents): Ditto.
+ * breakpoint.c (print_it_normal): Ditto.
+ (watchpoint_check): Ditto.
+ (print_it_done): Ditto.
+ (print_it_noop): Ditto.
+ (maintenance_info_breakpoints): Ditto.
+ (create_longjmp_breakpoint): Ditto.
+ (hbreak_command): Ditto.
+ (thbreak_command): Ditto.
+ (watch_commnd_1): Ditto.
+ (rwatch_command): Ditto.
+ (awatch_command): Ditto.
+ (do_enable_breakpoint): Ditto.
+ * ch-valprint.c (chill_val_print_array_elements): Ditto.
+ * eval.c (evaluate_subexp): Ditto.
+ (get_label): Ditto.
+ (evaluate_struct_tuple): Ditto.
+ * eval.c (init_array_element): Ditto.
+
+ * alpha-tdep.c (push_sigtramp_desc): Add prototype and make static.
+ * breakpoint.c (hw_breakpoint_used_count): Ditto.
+ (hw_watchpoint_used_count): Ditto.
+ * findvar.c (write_register_gen): Ditto.
+ (read_register_pid): Ditto.
+ * symtab.c (cplusplus_hint): Ditto.
+ * infcmd.c (breakpoint_auto_delete_contents): Ditto.
+ * ch-valprint.c (chill_print_type_scalar): Ditto.
+ * gdbtypes.c (add_name): Ditto.
+ (add_mangled_type): Ditto.
+ (cfront_mangle_name): Ditto.
+ * sparc-tdep.c (isbranch): Ditto.
+ * inftarg.c (child_stop): Ditto.
+ * win32-nat.c (child_stop): Ditto.
+ * mac-nat.c (child_stop): Ditto.
+ * remote-utils.c (sr_com): Ditto.
+ * dbxread.c (process_now): Ditto.
+ * ch-exp.c (require): Ditto.
+ (check_token): Ditto.
+ (expect): Ditto.
+ (parse_mode_call): Ditto.
+ (parse_mode_or_normal_call): Ditto.
+ * scm-lang.c (scm_lookup_name): Ditto
+ * f-lang.c (allocate_saved_bf_node): Ditto.
+ (allocate_saved_function_node): Ditto.
+ (allocate_saved_f77_common_node): Ditto.
+ (allocate_common_entry_node): Ditto.
+ (add_common_block): Ditto.
+ (add_common_entry): Ditto.
+ (find_first_common_named): Ditto.
+ (patch_common_entries): Ditto.
+ (patch_all_commons_by_name): Ditto.
+ (clear_bf_list): Ditto.
+ (get_bf_for_fcn): Ditto.
+ (clear_function_list): Ditto.
+ * scm-exp.c (scm_istr2int): Ditto.
+ (scm_istring2number): Ditto.
+ * scm-valprint.c (scm_inferior_print): Ditto.
+ * f-typeprint.c (print_equivalent_f77_float_type): Ditto.
+ * f-valprint.c (f77_get_dynamic_length_of_aggregate): Ditto.
+ (f77_create_arrayprint_offset_tbl): Ditto.
+ (f77_print_array_1): Ditto.
+ (f77_print_array): Ditto.
+ (list_all_visible_commons): Ditto.
+ (there_is_a_visible_common_named): Ditto.
+ * mdebugread.c (ecoff_relocate_efi): Ditto.
+ * callback.c (os_close): Ditto.
+ (os_get_errno): Ditto.
+ (os_isatty): Ditto.
+ (os_lseek): Ditto.
+ (os_open): Ditto.
+ (os_read): Ditto.
+ (os_read_stdin): Ditto.
+ (os_write): Ditto.
+ (os_write_stdout): Ditto.
+ (os_rename): Ditto.
+ (os_system): Ditto.
+ (os_time): Ditto.
+ (os_unlink): Ditto.
+ (os_shutdown): Ditto.
+ (os_init): Ditto.
+ (os_printf_filtered): Ditto.
+
+ * scm-lang.h (scm_parse): Change old style decl to prototype.
+ * config/alpha/tm-alphalinux.h (alpha_linux_sigtramp_offset): Ditto.
+ * top.c (init_proc): Ditto.
+ (query_hook): Ditto.
+ (error_hook): Ditto.
+ * f-lang.c (c_value_print): Ditto.
+ * ch-exp.c (parse_expression): Ditto.
+ (parse_primval): Ditto.
+ (parse_untyped_expr): Ditto.
+ (parse_opt_untyped_expr): Ditto.
+ (ch_lex): Ditto.
+ * config/sparc/tm-sparc.h (sparc_init_extra_frame_info): Ditto.
+ (sparc_frame_saved_pc): Ditto.
+ (sparc_push_dummy_frame): Ditto.
+ (sparc_pop_frame): Ditto.
+ * defs.h (fclose): Ditto.
+ (atof): Ditto.
+ (error_hook): Ditto.
+
+ * arc-tdep.c (single_step): Change arg to type "enum target_signal".
+ * rs6000-tdep.c (single_step): Ditto.
+ * sparc-tdep.c (single_step): Ditto.
+
+ * breakpoint.c (cleanup_executing_breakpoints): Change unused arg type
+ to PTR which is what make_cleanup expects.
+ * utils.c (null_cleanup): Change arg type to PTR.
+ * defs.h (null_cleanup): Change prototype to match actual function.
+ * config/sparc/tm-sparc.h (struct frame_info): Move forward decl.
+ * ch-valprint.c (chill_val_print): Cast 2nd arg of
+ chill_print_type_scalar to LONGEST.
+ * infrun.c (wait_for_inferior): Have empty switch case for
+ BPSTAT_WHAT_CHECK_SHLIBS when SOLIB_ADD is not defined.
+ (stop_on_solib_events): Only needed if SOLIB_ADD is defined.
+ * infcmd.c (attach_command): Only need auto_solib_add if SOLIB_ADD
+ is defined.
+ * symfile.c (generic_load): Scan long int using a long int spec,
+ not an int spec.
+ * infptrace.c (udot_info): Only need local variables if KERNEL_U_SIZE
+ is defined.
+ (fetch_register): Only need function if FETCH_INFERIOR_REGISTERS is
+ not defined.
+ * inflow.c (handle_sigio): Only need prototype when the actual
+ function is compiled in.
+ * valprint.c (longest_to_int): Expand error message to be
+ separate messages for args larger than largest signed int
+ and args smaller than smallest signed int.
+ * valprint.c (print_longest): Fix problems with support for case
+ where compiler supports type "long long" but the runtime doesn't
+ support printing them with "%ll".
+ * scm-valprint.c (scm_scmlist_print, scm_scmval_print): Change
+ return types to void since we don't actually return anything
+ meaningful and callees ignore the values anyway.
+ * procfs.c (modify_inherit_on_fork_flag): Enclose pr_flags in PIOCSET
+ ifdef.
+ (modify_run_on_last_close_flag): Ditto.
+ (wait_fd): Enclose local variables "num_fds" and "i" LOSING_POLL
+ ifdef
+ * alpha-tdep.c (push_sigtramp_desc): Return proc_desc rather than
+ random value.
+ * infrun.c (wait_for_inferior): Ensure random_signal is not used
+ uninitialized.
+ * valops.c (call_function_by_hand): Ensure struct_addr is not used
+ uninitialized.
+ * breakpoint.c (watch_command_1): Ensure prev_frame is not used
+ uninitialized.
+ * utils.c (vfprintf_maybe_filtered): Change second arg from "char *"
+ to "const char *".
+ * gdbtk.c (gdb_fetch_registers): Cast fourth arg to map_arg_registers
+ to proper pointer type, from int.
+ (gdbtk_query): Change first arg to "const char *" from "char *".
+ * infptrace.c (udot_info): Add two dummy args so that the type is
+ correct for passing to add_info.
+ * f-lang.c (saved_fcn): Move decl to head of file so it can be used
+ in prototypes.
+ (saved_bf_symnum): Ditto.
+ (SAVED_FUNCTION): Ditto.
+ (SAVED_FUNCTION_PTR): Ditto.
+ (SAVED_BF): Ditto.
+ (SAVED_BF_PTR): Ditto.
+ * ch-exp.c (parse_named_record_element): Build error message in
+ temporary buffer before passing it to expect, rather than passing
+ wrong number of args to expect.
+ * demangle.c (set_demangling_style): Call set_demangling_command with
+ correct number of arguments.
+ * inferior.h (terminal_init_inferior_with_pgrp): Change arg type to
+ int to match actual function.
+ (os_isatty): Call fdmap with right number of arguments, was missing
+ the host_callback* arg.
+ * target.c (cleanup_target): Prototype all functions casts.
+ * target.h (one_stepped, single_step): Declare here and convert
+ single_step to prototype.
+ * infrun.c (one_stepped, single_step): Don't declare externs
+ here, they have moved to target.h.
+ * eval.c (init_array_element): Declare previously undeclared
+ last two args as LONGEST.
+ * dcache.c (dcache_xfer_memory): Change xfunc decls to prototype form.
+
Thu Jul 25 16:11:54 1996 Doug Evans <dje@canuck.cygnus.com>
* dsrec.c (load_srec): Protect ANSI style function parms with PARAMS.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index bcb9b59..568ab74 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1008,7 +1008,8 @@ altos-xdep.o: altos-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
annotate.o: annotate.c $(defs_h) annotate.h $(value_h) target.h $(gdbtypes_h)
-arm-tdep.o: arm-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h)
+arm-tdep.o: arm-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
+ $(gdbcore_h)
bcache.o: bcache.c bcache.h $(defs_h)
@@ -1092,7 +1093,7 @@ corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h
-dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h
+dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h $(gdbcore_h)
dbxread.o: dbxread.c $(breakpoint_h) buildsym.h $(command_h) \
complaints.h $(defs_h) $(expression_h) gdb-stabs.h $(gdbcore_h) \
@@ -1178,7 +1179,7 @@ i386b-nat.o: i386b-nat.c $(defs_h)
i386ly-nat.o: i386ly-nat.c $(defs_h) $(frame_h) $(inferior_h) target.h
-i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) target.h
+i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) target.h $(gdbcore_h)
i386m3-nat.o: i386m3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) target.h
@@ -1193,7 +1194,7 @@ i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) language.h
i960-tdep.o: i960-tdep.c $(floatformat_h) $(defs_h) $(expression_h) \
- $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h)
+ $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(gdbcore_h)
infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) target.h language.h gdb_string.h
@@ -1232,12 +1233,13 @@ m2-typeprint.o: m2-typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(value_h) gdb_string.h
m2-valprint.o: m2-valprint.c $(defs_h) $(gdbtypes_h) $(symtab_h) \
- valprint.h
+ valprint.h m2-lang.h
m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) language.h target.h \
$(wait_h) $(gdbcmd_h) $(gdbcore_h)
-m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h)
+m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
+ $(gdbcore_h) gdb_string.h
m68kly-nat.o: m68kly-nat.c $(defs_h) $(frame_h) $(inferior_h) target.h
@@ -1303,7 +1305,7 @@ ns32km3-nat.o: ns32km3-nat.c $(defs_h) $(inferior_h)
ttyflush.o: nindy-share/ttyflush.c
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
-nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h)
+nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h)
ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h)
@@ -1425,10 +1427,10 @@ scm-exp.o: $(defs_h) $(value_h) parser-defs.h language.h c-lang.h \
scm-lang.h scm-tags.h
scm-lang.o: $(defs_h) $(value_h) parser-defs.h language.h c-lang.h \
- scm-lang.h scm-tags.h gdb_string.h
+ scm-lang.h scm-tags.h gdb_string.h $(gdbcore_h)
scm-valprint.o: $(defs_h) $(value_h) parser-defs.h language.h \
- scm-lang.h valprint.h
+ scm-lang.h valprint.h $(gdbcore_h)
ser-go32.o: ser-go32.c $(defs_h) serial.h
@@ -1461,7 +1463,7 @@ sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \
target.h
sparc-tdep.o: sparc-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) objfiles.h symfile.h target.h
+ $(inferior_h) objfiles.h symfile.h target.h gdb_string.h
sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) target.h
@@ -1528,7 +1530,7 @@ valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
- $(value_h) gdb_string.h
+ $(value_h) gdb_string.h valprint.h
values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) $(symtab_h) target.h $(value_h) \
@@ -1536,7 +1538,7 @@ values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
-w65-tdep.o : w65-tdep.c
+w65-tdep.o : w65-tdep.c $(gdbcore_h)
win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
gdb_string.h
@@ -1562,7 +1564,7 @@ xcoffread.o: xcoffread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) xcoffsolib.h
z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) $(frame_h) \
- $(gdbcmd_h) $(gdbtypes_h) $(symtab_h)
+ $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h)
c-exp.tab.o: c-exp.tab.c c-lang.h $(defs_h) $(expression_h) \
$(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index 0102a7b..d0c49c9 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#include <sys/user.h>
+static void fetch_core_registers PARAMS ((char *, unsigned, int, unsigned));
+
/* Size of elements in jmpbuf */
#define JB_ELEMENT_SIZE 8
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index d778bf2..08cd6d4 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -37,6 +37,8 @@ extern struct obstack frame_cache_obstack;
/* Forward declarations. */
+static alpha_extra_func_info_t push_sigtramp_desc PARAMS ((CORE_ADDR low_addr));
+
static CORE_ADDR read_next_frame_reg PARAMS ((struct frame_info *, int));
static CORE_ADDR heuristic_proc_start PARAMS ((CORE_ADDR));
@@ -155,11 +157,12 @@ struct linked_proc_info
guarantee that we are in the middle of a sigreturn syscall. Don't
think this will be a problem in praxis, though.
*/
+
long
alpha_linux_sigtramp_offset (CORE_ADDR pc)
{
unsigned int i[3], w;
- long off, res;
+ long off;
if (read_memory_nobpt(pc, (char *) &w, 4) != 0)
return -1;
@@ -209,8 +212,9 @@ alpha_osf_skip_sigtramp_frame (frame, pc)
the signal-handler return code starting at address LOW_ADDR. The
descriptor is added to the linked_proc_desc_table. */
-alpha_extra_func_info_t
-push_sigtramp_desc (CORE_ADDR low_addr)
+static alpha_extra_func_info_t
+push_sigtramp_desc (low_addr)
+ CORE_ADDR low_addr;
{
struct linked_proc_info *link;
alpha_extra_func_info_t proc_desc;
@@ -233,6 +237,7 @@ push_sigtramp_desc (CORE_ADDR low_addr)
PROC_PC_REG (proc_desc) = 26;
PROC_LOCALOFF (proc_desc) = 0;
SET_PROC_DESC_IS_DYN_SIGTRAMP (proc_desc);
+ return (proc_desc);
}
diff --git a/gdb/annotate.c b/gdb/annotate.c
index 282e171..cf83a8a 100644
--- a/gdb/annotate.c
+++ b/gdb/annotate.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "breakpoint.h"
static void print_value_flags PARAMS ((struct type *));
+static void breakpoint_changed PARAMS ((struct breakpoint *));
static void
print_value_flags (t)
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index b30cefa..65dd60b 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -527,7 +527,7 @@ int one_stepped;
void
single_step (ignore)
- int ignore; /* sig, but we don't need it */
+ enum target_signal ignore; /* sig, but we don't need it */
{
static CORE_ADDR next_pc, target;
static int brktrg_p;
diff --git a/gdb/bcache.c b/gdb/bcache.c
index ede908b..377355b 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -23,6 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bcache.h"
#include "gdb_string.h" /* For memcpy declaration */
+static unsigned int hash PARAMS ((void *, int));
+static void *lookup_cache PARAMS ((void *, int, int, struct bcache *));
+
/* FIXME: Incredibly simplistic hash generator. Probably way too expensive
(consider long strings) and unlikely to have good distribution across hash
values for typical input. */
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ff48d94..e1355c9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -118,7 +118,7 @@ static int
breakpoint_cond_eval PARAMS ((char *));
static void
-cleanup_executing_breakpoints PARAMS ((int));
+cleanup_executing_breakpoints PARAMS ((PTR));
static void
commands_command PARAMS ((char *, int));
@@ -135,6 +135,50 @@ set_breakpoint_count PARAMS ((int));
static int
remove_breakpoint PARAMS ((struct breakpoint *));
+static int
+print_it_normal PARAMS ((bpstat));
+
+static int
+watchpoint_check PARAMS ((char *));
+
+static int
+print_it_done PARAMS ((bpstat));
+
+static int
+print_it_noop PARAMS ((bpstat));
+
+static void
+maintenance_info_breakpoints PARAMS ((char *, int));
+
+#ifdef GET_LONGJMP_TARGET
+static void
+create_longjmp_breakpoint PARAMS ((char *));
+#endif
+
+static int
+hw_breakpoint_used_count PARAMS ((void));
+
+static int
+hw_watchpoint_used_count PARAMS ((enum bptype, int *));
+
+static void
+hbreak_command PARAMS ((char *, int));
+
+static void
+thbreak_command PARAMS ((char *, int));
+
+static void
+watch_command_1 PARAMS ((char *, int, int));
+
+static void
+rwatch_command PARAMS ((char *, int));
+
+static void
+awatch_command PARAMS ((char *, int));
+
+static void
+do_enable_breakpoint PARAMS ((struct breakpoint *, enum bpdisp));
+
extern int addressprint; /* Print machine addresses? */
/* Are we executing breakpoint commands? */
@@ -914,7 +958,7 @@ bpstat_clear_actions (bs)
/* ARGSUSED */
static void
cleanup_executing_breakpoints (ignore)
- int ignore;
+ PTR ignore;
{
executing_breakpoint_commands = 0;
}
@@ -2126,7 +2170,7 @@ re_enable_breakpoints_in_shlibs ()
#endif
-int
+static int
hw_breakpoint_used_count()
{
register struct breakpoint *b;
@@ -2141,7 +2185,7 @@ hw_breakpoint_used_count()
return i;
}
-int
+static int
hw_watchpoint_used_count(type, other_type_used)
enum bptype type;
int *other_type_used;
@@ -2545,7 +2589,8 @@ watch_command_1 (arg, accessflag, from_tty)
struct expression *exp;
struct block *exp_valid_block;
struct value *val, *mark;
- struct frame_info *frame, *prev_frame;
+ struct frame_info *frame;
+ struct frame_info *prev_frame = NULL;
char *exp_start = NULL;
char *exp_end = NULL;
char *tok, *end_tok;
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 66ee3e1..c01a56e 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "language.h"
#include "c-lang.h"
+static void emit_char PARAMS ((int, GDB_FILE *, int));
+
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
characters and strings is language specific. */
diff --git a/gdb/callback.c b/gdb/callback.c
index d59ecda..6e3c451 100644
--- a/gdb/callback.c
+++ b/gdb/callback.c
@@ -44,7 +44,24 @@
#include <fcntl.h>
#include <time.h>
-
+static int os_init PARAMS ((host_callback *));
+static int os_shutdown PARAMS ((host_callback *));
+static int os_unlink PARAMS ((host_callback *, const char *));
+static long os_time PARAMS ((host_callback *, long *));
+static int os_system PARAMS ((host_callback *, const char *));
+static int os_rename PARAMS ((host_callback *, const char *, const char *));
+static int os_write_stdout PARAMS ((host_callback *, const char *, int));
+static int os_write PARAMS ((host_callback *, int, const char *, int));
+static int os_read_stdin PARAMS ((host_callback *, char *, int));
+static int os_read PARAMS ((host_callback *, int, char *, int));
+static int os_open PARAMS ((host_callback *, const char *, int));
+static int os_lseek PARAMS ((host_callback *, int, long, int));
+static int os_isatty PARAMS ((host_callback *, int));
+static int os_get_errno PARAMS ((host_callback *));
+static int os_close PARAMS ((host_callback *, int));
+static int fdmap PARAMS ((host_callback *, int));
+static int fdbad PARAMS ((host_callback *, int));
+static int wrap PARAMS ((host_callback *, int));
/* Set the callback copy of errno from what we see now. */
static int
@@ -80,7 +97,7 @@ fdmap (p, fd)
return p->fdmap[fd];
}
-int
+static int
os_close (p, fd)
host_callback *p;
int fd;
@@ -94,7 +111,7 @@ os_close (p, fd)
return result;
}
-int
+static int
os_get_errno (p)
host_callback *p;
{
@@ -103,7 +120,7 @@ os_get_errno (p)
}
-int
+static int
os_isatty (p, fd)
host_callback *p;
int fd;
@@ -113,11 +130,11 @@ os_isatty (p, fd)
result = fdbad (p, fd);
if (result)
return result;
- result = wrap (p, isatty (fdmap (fd)));
+ result = wrap (p, isatty (fdmap (p, fd)));
return result;
}
-int
+static int
os_lseek (p, fd, off, way)
host_callback *p;
int fd;
@@ -133,7 +150,7 @@ os_lseek (p, fd, off, way)
return result;
}
-int
+static int
os_open (p, name, flags)
host_callback *p;
const char *name;
@@ -159,7 +176,7 @@ os_open (p, name, flags)
return -1;
}
-int
+static int
os_read (p, fd, buf, len)
host_callback *p;
int fd;
@@ -175,7 +192,7 @@ os_read (p, fd, buf, len)
return result;
}
-int
+static int
os_read_stdin (p, buf, len)
host_callback *p;
char *buf;
@@ -184,7 +201,7 @@ os_read_stdin (p, buf, len)
return wrap (p, read (0, buf, len));
}
-int
+static int
os_write (p, fd, buf, len)
host_callback *p;
int fd;
@@ -201,7 +218,8 @@ os_write (p, fd, buf, len)
}
/* ignore the grossness of INSIDE_SIMULATOR, it will go away one day. */
-int
+
+static int
os_write_stdout (p, buf, len)
host_callback *p;
const char *buf;
@@ -225,7 +243,7 @@ os_write_stdout (p, buf, len)
#endif
}
-int
+static int
os_rename (p, f1, f2)
host_callback *p;
const char *f1;
@@ -235,7 +253,7 @@ os_rename (p, f1, f2)
}
-int
+static int
os_system (p, s)
host_callback *p;
const char *s;
@@ -243,7 +261,7 @@ os_system (p, s)
return wrap (p, system (s));
}
-long
+static long
os_time (p, t)
host_callback *p;
long *t;
@@ -252,7 +270,7 @@ os_time (p, t)
}
-int
+static int
os_unlink (p, f1)
host_callback *p;
const char *f1;
@@ -261,9 +279,9 @@ os_unlink (p, f1)
}
-int
+static int
os_shutdown (p)
-host_callback *p;
+ host_callback *p;
{
int i;
for (i = 0; i < MAX_CALLBACK_FDS; i++)
@@ -276,8 +294,9 @@ host_callback *p;
return 1;
}
-int os_init(p)
-host_callback *p;
+static int
+os_init(p)
+ host_callback *p;
{
int i;
os_shutdown (p);
@@ -296,7 +315,7 @@ host_callback *p;
move the whole file into sim/common and remove this bit. */
/* VARARGS */
-void
+static void
#ifdef ANSI_PROTOTYPES
os_printf_filtered (host_callback *p, const char *format, ...)
#else
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c
index f6f522a..fd92780 100644
--- a/gdb/ch-exp.c
+++ b/gdb/ch-exp.c
@@ -55,6 +55,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "symfile.h" /* Required by objfiles.h. */
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
+#ifdef __GNUC__
+#define INLINE __inline__
+#endif
+
typedef union
{
@@ -131,13 +135,55 @@ enum ch_terminal {
};
/* Forward declarations. */
-static void parse_expr ();
-static void parse_primval ();
-static void parse_untyped_expr ();
-static int parse_opt_untyped_expr ();
-static void parse_if_expression_body PARAMS((void));
+
static void write_lower_upper_value PARAMS ((enum exp_opcode, struct type *));
-static enum ch_terminal ch_lex ();
+static enum ch_terminal match_bitstring_literal PARAMS ((void));
+static enum ch_terminal match_integer_literal PARAMS ((void));
+static enum ch_terminal match_character_literal PARAMS ((void));
+static enum ch_terminal match_string_literal PARAMS ((void));
+static enum ch_terminal match_float_literal PARAMS ((void));
+static enum ch_terminal match_float_literal PARAMS ((void));
+static int decode_integer_literal PARAMS ((LONGEST *, char **));
+static int decode_integer_value PARAMS ((int, char **, LONGEST *));
+static char *match_simple_name_string PARAMS ((void));
+static void growbuf_by_size PARAMS ((int));
+static void parse_untyped_expr PARAMS ((void));
+static void parse_if_expression PARAMS ((void));
+static void parse_else_alternative PARAMS ((void));
+static void parse_then_alternative PARAMS ((void));
+static void parse_expr PARAMS ((void));
+static void parse_operand0 PARAMS ((void));
+static void parse_operand1 PARAMS ((void));
+static void parse_operand2 PARAMS ((void));
+static void parse_operand3 PARAMS ((void));
+static void parse_operand4 PARAMS ((void));
+static void parse_operand5 PARAMS ((void));
+static void parse_operand6 PARAMS ((void));
+static void parse_primval PARAMS ((void));
+static void parse_tuple PARAMS ((struct type *));
+static void parse_opt_element_list PARAMS ((void));
+static void parse_tuple_element PARAMS ((void));
+static void parse_named_record_element PARAMS ((void));
+static void parse_call PARAMS ((void));
+static struct type *parse_mode_or_normal_call PARAMS ((void));
+#if 0
+static struct type *parse_mode_call PARAMS ((void));
+#endif
+static void parse_unary_call PARAMS ((void));
+static int parse_opt_untyped_expr PARAMS ((void));
+static void parse_case_label PARAMS ((void));
+static int expect PARAMS ((enum ch_terminal, char *));
+static void parse_expr PARAMS ((void));
+static void parse_primval PARAMS ((void));
+static void parse_untyped_expr PARAMS ((void));
+static int parse_opt_untyped_expr PARAMS ((void));
+static void parse_if_expression_body PARAMS((void));
+static enum ch_terminal ch_lex PARAMS ((void));
+INLINE static enum ch_terminal PEEK_TOKEN PARAMS ((void));
+static enum ch_terminal peek_token_ PARAMS ((int));
+static void forward_token_ PARAMS ((void));
+static void require PARAMS ((enum ch_terminal));
+static int check_token PARAMS ((enum ch_terminal));
#define MAX_LOOK_AHEAD 2
static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD+1] = {
@@ -147,10 +193,7 @@ static YYSTYPE val_buffer[MAX_LOOK_AHEAD+1];
/*int current_token, lookahead_token;*/
-#ifdef __GNUC__
-__inline__
-#endif
-static enum ch_terminal
+INLINE static enum ch_terminal
PEEK_TOKEN()
{
if (terminal_buffer[0] == TOKEN_NOT_READ)
@@ -214,7 +257,7 @@ forward_token_()
/* Skip the next token.
if it isn't TOKEN, the parser is broken. */
-void
+static void
require(token)
enum ch_terminal token;
{
@@ -227,7 +270,7 @@ require(token)
FORWARD_TOKEN();
}
-int
+static int
check_token (token)
enum ch_terminal token;
{
@@ -240,8 +283,8 @@ check_token (token)
/* return 0 if expected token was not found,
else return 1.
*/
-int
-expect(token, message)
+static int
+expect (token, message)
enum ch_terminal token;
char *message;
{
@@ -408,7 +451,9 @@ parse_unary_call ()
/* Parse NAME '(' MODENAME ')'. */
-struct type *
+#if 0
+
+static struct type *
parse_mode_call ()
{
struct type *type;
@@ -422,7 +467,9 @@ parse_mode_call ()
return type;
}
-struct type *
+#endif
+
+static struct type *
parse_mode_or_normal_call ()
{
struct type *type;
@@ -486,9 +533,11 @@ static void
parse_named_record_element ()
{
struct stoken label;
+ char buf[256];
label = PEEK_LVAL ().sval;
- expect (FIELD_NAME, "expected a field name here `%s'", lexptr);
+ sprintf (buf, "expected a field name here `%s'", lexptr);
+ expect (FIELD_NAME, buf);
if (check_token (','))
parse_named_record_element ();
else if (check_token (':'))
@@ -2072,7 +2121,6 @@ write_lower_upper_value (opcode, type)
write_exp_elt_opcode (opcode);
else
{
- extern LONGEST type_lower_upper ();
struct type *result_type;
LONGEST val = type_lower_upper (opcode, type, &result_type);
write_exp_elt_opcode (OP_LONG);
diff --git a/gdb/ch-lang.c b/gdb/ch-lang.c
index 8504d67..b726243 100644
--- a/gdb/ch-lang.c
+++ b/gdb/ch-lang.c
@@ -26,6 +26,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "language.h"
#include "ch-lang.h"
+static value_ptr
+evaluate_subexp_chill PARAMS ((struct type *, struct expression *, int *, enum noside));
+
+static value_ptr
+value_chill_max_min PARAMS ((enum exp_opcode, value_ptr));
+
+static value_ptr
+value_chill_card PARAMS ((value_ptr));
+
+static value_ptr
+ value_chill_length PARAMS ((value_ptr));
+
+static struct type *
+chill_create_fundamental_type PARAMS ((struct objfile *, int));
+
+static void
+chill_printstr PARAMS ((GDB_FILE *, char *, unsigned int, int));
+
+static void
+chill_printchar PARAMS ((int, GDB_FILE *));
/* For now, Chill uses a simple mangling algorithm whereby you simply
discard everything after the occurance of two successive CPLUS_MARKER
diff --git a/gdb/ch-lang.h b/gdb/ch-lang.h
index f09a35b..699ab15 100644
--- a/gdb/ch-lang.h
+++ b/gdb/ch-lang.h
@@ -37,3 +37,6 @@ chill_val_print PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *, int, int,
extern int
chill_value_print PARAMS ((struct value *, GDB_FILE *,
int, enum val_prettyprint));
+
+extern LONGEST
+type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c
index 9b20137..fcc821f 100644
--- a/gdb/ch-valprint.c
+++ b/gdb/ch-valprint.c
@@ -36,6 +36,13 @@ static void
chill_print_value_fields PARAMS ((struct type *, char *, GDB_FILE *, int, int,
enum val_prettyprint, struct type **));
+static void
+chill_print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
+
+static void
+chill_val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
+ int, int, int, enum val_prettyprint));
+
/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
Used to print data from type structures in a specified type. For example,
@@ -43,7 +50,7 @@ chill_print_value_fields PARAMS ((struct type *, char *, GDB_FILE *, int, int,
allows the ranges to be printed in their "natural" form rather than as
decimal integer values. */
-void
+static void
chill_print_type_scalar (type, val, stream)
struct type *type;
LONGEST val;
@@ -382,7 +389,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
{
if (need_comma)
fputs_filtered (", ", stream);
- chill_print_type_scalar (range, i, stream);
+ chill_print_type_scalar (range, (LONGEST) i, stream);
need_comma = 1;
/* Look for a continuous range of true elements. */
@@ -393,7 +400,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
while (i+1 <= high_bound
&& value_bit_index (type, valaddr, ++i))
j = i;
- chill_print_type_scalar (range, j, stream);
+ chill_print_type_scalar (range, (LONGEST) j, stream);
}
}
}
diff --git a/gdb/core-aout.c b/gdb/core-aout.c
index 7103a9c..ec755c5 100644
--- a/gdb/core-aout.c
+++ b/gdb/core-aout.c
@@ -52,6 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/core.h>
#endif
+static void
+fetch_core_registers PARAMS ((char *, unsigned, int, unsigned));
+
/* Extract the register values out of the core file and store
them where `read_register' will find them.
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 0d01bf0..1bbc47c 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -52,6 +52,10 @@ static void core_close PARAMS ((int));
static void get_core_registers PARAMS ((int));
+static void add_to_thread_list PARAMS ((bfd *, asection *, PTR));
+
+static int ignore PARAMS ((CORE_ADDR, char *));
+
/* Link a new core_fns into the global core_file_fns list. Called on gdb
startup by the _initialize routine in each core file register reader, to
register information about each format the the reader is prepared to
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 043d67e..5b0e5cc 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -65,11 +65,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/aout64.h"
#include "aout/stab_gnu.h" /* We always use GNU stabs, not native, now */
-/* defined in stabsread.c; used for completing cfront stabs strings */
-extern void
-resolve_cfront_continuation PARAMS((struct objfile * objfile,
- struct symbol * sym, char * p));
-
/* We put a pointer to this structure in the read_symtab_private field
of the psymtab. */
@@ -211,6 +206,9 @@ static int bincls_allocated;
/* Local function prototypes */
+static void
+process_now PARAMS ((struct objfile *));
+
static void
free_header_files PARAMS ((void));
@@ -779,7 +777,7 @@ process_later(sym,p)
cont_count++;
}
-void
+static void
process_now(objfile)
struct objfile * objfile;
{
diff --git a/gdb/dcache.c b/gdb/dcache.c
index 60caa29..8020797 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -23,7 +23,7 @@
#include "dcache.h"
#include "gdbcmd.h"
#include "gdb_string.h"
-
+#include "gdbcore.h"
/*
The data cache could lead to incorrect results because it doesn't know
@@ -478,8 +478,8 @@ dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write)
if (remote_dcache)
{
- int (*xfunc) ()
- = should_write ? dcache_poke_byte : dcache_peek_byte;
+ int (*xfunc) PARAMS ((DCACHE *dcache, CORE_ADDR addr, char *ptr));
+ xfunc = should_write ? dcache_poke_byte : dcache_peek_byte;
for (i = 0; i < len; i++)
{
@@ -491,8 +491,8 @@ dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write)
}
else
{
- int (*xfunc) ()
- = should_write ? dcache->write_memory : dcache->read_memory;
+ memxferfunc xfunc;
+ xfunc = should_write ? dcache->write_memory : dcache->read_memory;
if (dcache->cache_has_stuff)
dcache_flush (dcache);
diff --git a/gdb/defs.h b/gdb/defs.h
index cf2b3f4..999af2e 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -45,6 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <varargs.h>
#endif
+#define PRIVATE_XMALLOC 1 /* Suppress libiberty decls for xmalloc/xrealloc */
#include "libiberty.h"
/* libiberty.h can't declare this one, but evidently we can. */
@@ -207,6 +208,12 @@ extern char *chill_demangle PARAMS ((const char *));
/* From utils.c */
+extern PTR xmalloc PARAMS ((long));
+
+extern PTR xrealloc PARAMS ((PTR, long));
+
+extern void notice_quit PARAMS ((void));
+
extern int strcmp_iw PARAMS ((const char *, const char *));
extern char *safe_strerror PARAMS ((int));
@@ -242,12 +249,17 @@ extern void restore_cleanups PARAMS ((struct cleanup *));
extern void free_current_contents PARAMS ((char **));
-extern void null_cleanup PARAMS ((char **));
+extern void null_cleanup PARAMS ((PTR));
extern int myread PARAMS ((int, char *, int));
extern int query PARAMS((char *, ...))
ATTR_FORMAT(printf, 1, 2);
+
+/* From demangle.c */
+
+extern void set_demangling_style PARAMS ((char *));
+
/* Annotation stuff. */
@@ -643,11 +655,11 @@ extern char *getenv PARAMS ((const char *));
somewhere. */
#ifndef FCLOSE_PROVIDED
-extern int fclose ();
+extern int fclose PARAMS ((FILE *));
#endif
#ifndef atof
-extern double atof ();
+extern double atof PARAMS ((const char *)); /* X3.159-1989 4.10.1.1 */
#endif
#ifndef MALLOC_INCOMPATIBLE
@@ -660,30 +672,6 @@ extern void free ();
#endif /* MALLOC_INCOMPATIBLE */
-#ifndef __WIN32__
-
-#ifndef strchr
-extern char *strchr ();
-#endif
-
-#ifndef strrchr
-extern char *strrchr ();
-#endif
-
-#ifndef strstr
-extern char *strstr ();
-#endif
-
-#ifndef strtok
-extern char *strtok ();
-#endif
-
-#ifndef strerror
-extern char *strerror ();
-#endif
-
-#endif /* !__WIN32__ */
-
/* Various possibilities for alloca. */
#ifndef alloca
# ifdef __GNUC__
@@ -998,7 +986,7 @@ extern int (*target_wait_hook) PARAMS ((int pid,
extern void (*call_command_hook) PARAMS ((struct cmd_list_element *c,
char *cmd, int from_tty));
-extern NORETURN void (*error_hook) PARAMS (()) ATTR_NORETURN;
+extern NORETURN void (*error_hook) PARAMS ((void)) ATTR_NORETURN;
diff --git a/gdb/demangle.c b/gdb/demangle.c
index bb3f092..2d1ad2a 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -70,6 +70,9 @@ static const struct demangler
{NULL, unknown_demangling, NULL}
};
+static void
+set_demangling_command PARAMS ((char *, int, struct cmd_list_element *));
+
/* set current demangling style. called by the "set demangling" command
after it has updated the current_demangling_style_string to match
what the user has entered.
@@ -159,7 +162,7 @@ set_demangling_style (style)
free (current_demangling_style_string);
}
current_demangling_style_string = savestring (style, strlen (style));
- set_demangling_command ((char *) NULL, 0);
+ set_demangling_command ((char *) NULL, 0, (struct cmd_list_element *) NULL);
}
/* In order to allow a single demangler executable to demangle strings
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index ed82009..798a1f9 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -442,6 +442,9 @@ static const struct language_defn *cu_language_defn;
/* Forward declarations of static functions so we don't have to worry
about ordering within this file. */
+static void
+free_utypes PARAMS ((PTR));
+
static int
attribute_size PARAMS ((unsigned int));
diff --git a/gdb/exec.c b/gdb/exec.c
index e95454d..fa64163 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -58,6 +58,10 @@ static void set_section_command PARAMS ((char *, int));
static void exec_files_info PARAMS ((struct target_ops *));
+static void bfdsec_to_vmap PARAMS ((bfd *, sec_ptr, PTR));
+
+static int ignore PARAMS ((CORE_ADDR, char *));
+
extern int info_verbose;
/* The Binary File Descriptor handle for the executable file. */
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 528d215..caf0ca6 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -109,6 +109,10 @@ static int yylex PARAMS ((void));
void yyerror PARAMS ((char *));
+static void growbuf_by_size PARAMS ((int));
+
+static int match_string_literal PARAMS ((void));
+
%}
/* Although the yacc "value" of an expression is not used,
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 57a6809..976211e 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -45,6 +45,47 @@ struct type *builtin_type_f_complex_s16;
struct type *builtin_type_f_complex_s32;
struct type *builtin_type_f_void;
+/* Following is dubious stuff that had been in the xcoff reader. */
+
+struct saved_fcn
+{
+ long line_offset; /* Line offset for function */
+ struct saved_fcn *next;
+};
+
+
+struct saved_bf_symnum
+{
+ long symnum_fcn; /* Symnum of function (i.e. .function directive) */
+ long symnum_bf; /* Symnum of .bf for this function */
+ struct saved_bf_symnum *next;
+};
+
+typedef struct saved_fcn SAVED_FUNCTION, *SAVED_FUNCTION_PTR;
+typedef struct saved_bf_symnum SAVED_BF, *SAVED_BF_PTR;
+
+/* Local functions */
+
+#if 0
+static void clear_function_list PARAMS ((void));
+static long get_bf_for_fcn PARAMS ((long));
+static void clear_bf_list PARAMS ((void));
+static void patch_all_commons_by_name PARAMS ((char *, CORE_ADDR, int));
+static SAVED_F77_COMMON_PTR find_first_common_named PARAMS ((char *));
+static void add_common_entry PARAMS ((struct symbol *));
+static void add_common_block PARAMS ((char *, CORE_ADDR, int, char *));
+static SAVED_FUNCTION *allocate_saved_function_node PARAMS ((void));
+static SAVED_BF_PTR allocate_saved_bf_node PARAMS ((void));
+static COMMON_ENTRY_PTR allocate_common_entry_node PARAMS ((void));
+static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node PARAMS ((void));
+#endif
+
+static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int));
+static struct type *f_create_fundamental_type PARAMS ((struct objfile *, int));
+static void f_printstr PARAMS ((FILE *, char *, unsigned int, int));
+static void f_printchar PARAMS ((int, FILE *));
+static void emit_char PARAMS ((int, FILE *, int));
+
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
characters and strings is language specific.
@@ -413,7 +454,10 @@ struct type ** const (f_builtin_types[]) =
0
};
-int c_value_print();
+/* This is declared in c-lang.h but it is silly to import that file for what
+ is already just a hack. */
+extern int
+c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
const struct language_defn f_language_defn = {
"fortran",
@@ -523,27 +567,9 @@ _initialize_f_language ()
add_language (&f_language_defn);
}
-/* Following is dubious stuff that had been in the xcoff reader. */
-
-struct saved_fcn
-{
- long line_offset; /* Line offset for function */
- struct saved_fcn *next;
-};
-
-
-struct saved_bf_symnum
-{
- long symnum_fcn; /* Symnum of function (i.e. .function directive) */
- long symnum_bf; /* Symnum of .bf for this function */
- struct saved_bf_symnum *next;
-};
-
-typedef struct saved_fcn SAVED_FUNCTION, *SAVED_FUNCTION_PTR;
-typedef struct saved_bf_symnum SAVED_BF, *SAVED_BF_PTR;
-
-
-SAVED_BF_PTR allocate_saved_bf_node()
+#if 0
+static SAVED_BF_PTR
+allocate_saved_bf_node()
{
SAVED_BF_PTR new;
@@ -551,7 +577,8 @@ SAVED_BF_PTR allocate_saved_bf_node()
return(new);
}
-SAVED_FUNCTION *allocate_saved_function_node()
+static SAVED_FUNCTION *
+allocate_saved_function_node()
{
SAVED_FUNCTION *new;
@@ -559,7 +586,7 @@ SAVED_FUNCTION *allocate_saved_function_node()
return(new);
}
-SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
+static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
{
SAVED_F77_COMMON_PTR new;
@@ -567,41 +594,38 @@ SAVED_F77_COMMON_PTR allocate_saved_f77_common_node()
return(new);
}
-COMMON_ENTRY_PTR allocate_common_entry_node()
+static COMMON_ENTRY_PTR allocate_common_entry_node()
{
COMMON_ENTRY_PTR new;
new = (COMMON_ENTRY_PTR) xmalloc (sizeof (COMMON_ENTRY));
return(new);
}
-
+#endif
SAVED_F77_COMMON_PTR head_common_list=NULL; /* Ptr to 1st saved COMMON */
SAVED_F77_COMMON_PTR tail_common_list=NULL; /* Ptr to last saved COMMON */
SAVED_F77_COMMON_PTR current_common=NULL; /* Ptr to current COMMON */
+#if 0
static SAVED_BF_PTR saved_bf_list=NULL; /* Ptr to (.bf,function)
list*/
-#if 0
static SAVED_BF_PTR saved_bf_list_end=NULL; /* Ptr to above list's end */
-#endif
static SAVED_BF_PTR current_head_bf_list=NULL; /* Current head of above list
*/
-#if 0
static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
in macros */
-#endif
/* The following function simply enters a given common block onto
the global common block chain */
-void add_common_block(name,offset,secnum,func_stab)
+static void
+add_common_block(name,offset,secnum,func_stab)
char *name;
CORE_ADDR offset;
int secnum;
char *func_stab;
-
{
SAVED_F77_COMMON_PTR tmp;
char *c,*local_copy_func_stab;
@@ -662,14 +686,15 @@ void add_common_block(name,offset,secnum,func_stab)
tail_common_list->next = tmp;
tail_common_list = tmp;
}
-
}
-
+#endif
/* The following function simply enters a given common entry onto
the "current_common" block that has been saved away. */
-void add_common_entry(entry_sym_ptr)
+#if 0
+static void
+add_common_entry(entry_sym_ptr)
struct symbol *entry_sym_ptr;
{
COMMON_ENTRY_PTR tmp;
@@ -700,13 +725,14 @@ void add_common_entry(entry_sym_ptr)
current_common->end_of_entries = tmp;
}
}
-
-
}
+#endif
/* This routine finds the first encountred COMMON block named "name" */
-SAVED_F77_COMMON_PTR find_first_common_named(name)
+#if 0
+static SAVED_F77_COMMON_PTR
+find_first_common_named(name)
char *name;
{
@@ -723,6 +749,7 @@ SAVED_F77_COMMON_PTR find_first_common_named(name)
}
return(NULL);
}
+#endif
/* This routine finds the first encountred COMMON block named "name"
that belongs to function funcname */
@@ -754,7 +781,8 @@ SAVED_F77_COMMON_PTR find_common_for_function(name, funcname)
"name." */
-void patch_common_entries (blk, offset, secnum)
+static void
+patch_common_entries (blk, offset, secnum)
SAVED_F77_COMMON_PTR blk;
CORE_ADDR offset;
int secnum;
@@ -782,8 +810,9 @@ void patch_common_entries (blk, offset, secnum)
hashed-lookup. Secnum is the section number for the .bss section
(which is where common data lives). */
-
-void patch_all_commons_by_name (name, offset, secnum)
+#if 0
+static void
+patch_all_commons_by_name (name, offset, secnum)
char *name;
CORE_ADDR offset;
int secnum;
@@ -812,12 +841,8 @@ void patch_all_commons_by_name (name, offset, secnum)
tmp = tmp->next;
}
-
}
-
-
-
-
+#endif
/* This macro adds the symbol-number for the start of the function
(the symbol number of the .bf) referenced by symnum_fcn to a
@@ -856,7 +881,8 @@ else \
/* This function frees the entire (.bf,function) list */
-void
+#if 0
+static void
clear_bf_list()
{
@@ -871,10 +897,13 @@ void
}
saved_bf_list = NULL;
}
+#endif
int global_remote_debug;
-long
+#if 0
+
+static long
get_bf_for_fcn (the_function)
long the_function;
{
@@ -924,11 +953,10 @@ get_bf_for_fcn (the_function)
}
static SAVED_FUNCTION_PTR saved_function_list=NULL;
-#if 0 /* Currently unused */
static SAVED_FUNCTION_PTR saved_function_list_end=NULL;
-#endif
-void clear_function_list()
+static void
+clear_function_list()
{
SAVED_FUNCTION_PTR tmp = saved_function_list;
SAVED_FUNCTION_PTR next = NULL;
@@ -942,3 +970,5 @@ void clear_function_list()
saved_function_list = NULL;
}
+#endif
+
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index 3ab6237..4bca773 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -43,6 +43,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static void f_type_print_args PARAMS ((struct type *, FILE *));
#endif
+static void print_equivalent_f77_float_type PARAMS ((struct type *, FILE *));
+
static void f_type_print_varspec_suffix PARAMS ((struct type *, FILE *,
int, int, int));
@@ -307,7 +309,7 @@ f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
}
}
-void
+static void
print_equivalent_f77_float_type (type, stream)
struct type *type;
FILE *stream;
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 1143b9d..e730f37 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -33,9 +33,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdbcore.h"
#include "command.h"
-extern unsigned int print_max; /* No of array elements to print */
-
-extern int calc_f77_array_dims PARAMS ((struct type *));
+#if 0
+static int there_is_a_visible_common_named PARAMS ((char *));
+#endif
+
+static void info_common_command PARAMS ((char *, int));
+static void list_all_visible_commons PARAMS ((char *));
+static void f77_print_array PARAMS ((struct type *, char *, CORE_ADDR,
+ FILE *, int, int, int,
+ enum val_prettyprint));
+static void f77_print_array_1 PARAMS ((int, int, struct type *, char *,
+ CORE_ADDR, FILE *, int, int, int,
+ enum val_prettyprint));
+static void f77_create_arrayprint_offset_tbl PARAMS ((struct type *, FILE *));
+static void f77_get_dynamic_length_of_aggregate PARAMS ((struct type *));
int f77_array_offset_tbl[MAX_FORTRAN_DIMS+1][2];
@@ -178,7 +189,7 @@ f77_get_dynamic_upperbound (type, upper_bound)
/* Obtain F77 adjustable array dimensions */
-void
+static void
f77_get_dynamic_length_of_aggregate (type)
struct type *type;
{
@@ -217,7 +228,7 @@ f77_get_dynamic_length_of_aggregate (type)
/* Function that sets up the array offset,size table for the array
type "type". */
-void
+static void
f77_create_arrayprint_offset_tbl (type, stream)
struct type *type;
FILE *stream;
@@ -266,13 +277,13 @@ f77_create_arrayprint_offset_tbl (type, stream)
/* Actual function which prints out F77 arrays, Valaddr == address in
the superior. Address == the address in the inferior. */
-void
+static void
f77_print_array_1 (nss, ndimensions, type, valaddr, address,
stream, format, deref_ref, recurse, pretty)
int nss;
int ndimensions;
- char *valaddr;
struct type *type;
+ char *valaddr;
CORE_ADDR address;
FILE *stream;
int format;
@@ -290,7 +301,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
f77_print_array_1 (nss + 1, ndimensions, TYPE_TARGET_TYPE (type),
valaddr + i * F77_DIM_OFFSET (nss),
address + i * F77_DIM_OFFSET (nss),
- stream, format, deref_ref, recurse, pretty, i);
+ stream, format, deref_ref, recurse, pretty);
fprintf_filtered (stream, ") ");
}
}
@@ -315,7 +326,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
/* This function gets called to print an F77 array, we set up some
stuff and then immediately call f77_print_array_1() */
-void
+static void
f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
pretty)
struct type *type;
@@ -561,7 +572,7 @@ f_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
return 0;
}
-void
+static void
list_all_visible_commons (funname)
char *funname;
{
@@ -680,7 +691,8 @@ info_common_command (comname, from_tty)
/* This function is used to determine whether there is a
F77 common block visible at the current scope called 'comname'. */
-int
+#if 0
+static int
there_is_a_visible_common_named (comname)
char *comname;
{
@@ -739,6 +751,7 @@ there_is_a_visible_common_named (comname)
return (the_common ? 1 : 0);
}
+#endif
void
_initialize_f_valprint ()
diff --git a/gdb/gdb_string.h b/gdb/gdb_string.h
index 4fb53bb..0c6b68a 100644
--- a/gdb/gdb_string.h
+++ b/gdb/gdb_string.h
@@ -28,11 +28,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# else
# include <strings.h>
# endif
-extern char *strchr();
-extern char *strrchr();
-extern char *strstr();
-extern char *strtok();
-extern char *strerror();
+
+#ifndef strchr
+extern char *strchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.2 */
+#endif
+
+#ifndef strrchr
+extern char *strrchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.5 */
+#endif
+
+#ifndef strstr
+extern char *strstr PARAMS ((const char *, const char *)); /* X3.159-1989 4.11.5.7 */
+#endif
+
+#ifndef strtok
+extern char *strtok PARAMS ((char *, const char *)); /* X3.159-1989 4.11.5.8 */
+#endif
+
+#ifndef strerror
+extern char *strerror PARAMS ((int)); /* X3.159-1989 4.11.6.2 */
+#endif
+
# ifdef HAVE_MEMORY_H
# include <memory.h>
# else
@@ -43,6 +59,6 @@ extern int memcmp();
# endif
#endif
-extern char *strdup();
+extern char *strdup ();
#endif /* !defined(GDB_STRING_H) */
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index dc57672..a8193be 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -55,6 +55,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef SIOCSPGRP
#endif
+static void null_routine PARAMS ((int));
+static void gdbtk_flush PARAMS ((FILE *));
+static void gdbtk_fputs PARAMS ((const char *, FILE *));
+static int gdbtk_query PARAMS ((const char *, va_list));
+static char *gdbtk_readline PARAMS ((char *));
+static void gdbtk_init PARAMS ((void));
+static void tk_command_loop PARAMS ((void));
+static void gdbtk_call_command PARAMS ((struct cmd_list_element *, char *, int));
+static int gdbtk_wait PARAMS ((int, struct target_waitstatus *));
+static void x_event PARAMS ((int));
+static void gdbtk_interactive PARAMS ((void));
+static void cleanup_init PARAMS ((int));
+static void tk_command PARAMS ((char *, int));
+static int gdb_disassemble PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int compare_lines PARAMS ((const PTR, const PTR));
+static int gdbtk_dis_asm_read_memory PARAMS ((bfd_vma, bfd_byte *, int, disassemble_info *));
+static int gdb_stop PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int gdb_listfiles PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int call_wrapper PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int gdb_cmd PARAMS ((ClientData, Tcl_Interp *, int, char *argv[]));
+static int gdb_fetch_registers PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static void gdbtk_readline_end PARAMS ((void));
+static int gdb_changed_register_list PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static void register_changed_p PARAMS ((int, void *));
+static int gdb_get_breakpoint_list PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int gdb_get_breakpoint_info PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static void breakpoint_notify PARAMS ((struct breakpoint *, const char *));
+static void gdbtk_create_breakpoint PARAMS ((struct breakpoint *));
+static void gdbtk_delete_breakpoint PARAMS ((struct breakpoint *));
+static void gdbtk_modify_breakpoint PARAMS ((struct breakpoint *));
+static int gdb_loc PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int gdb_eval PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int gdb_sourcelines PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static int map_arg_registers PARAMS ((int, char *[], void (*) (int, void *), void *));
+static void get_register_name PARAMS ((int, void *));
+static int gdb_regnames PARAMS ((ClientData, Tcl_Interp *, int, char *[]));
+static void get_register PARAMS ((int, void *));
+
/* Handle for TCL interpreter */
static Tcl_Interp *interp = NULL;
@@ -166,7 +204,7 @@ gdbtk_fputs (ptr, stream)
static int
gdbtk_query (query, args)
- char *query;
+ const char *query;
va_list args;
{
char buf[200], *merge[2];
@@ -591,7 +629,7 @@ gdb_regnames (clientData, interp, argc, argv)
argc--;
argv++;
- return map_arg_registers (argc, argv, get_register_name, 0);
+ return map_arg_registers (argc, argv, get_register_name, NULL);
}
#ifndef REGISTER_CONVERTIBLE
@@ -667,7 +705,7 @@ gdb_fetch_registers (clientData, interp, argc, argv)
argc--;
format = **argv++;
- return map_arg_registers (argc, argv, get_register, format);
+ return map_arg_registers (argc, argv, get_register, (void *) format);
}
/* This contains the previous values of the registers, since the last call to
@@ -681,7 +719,6 @@ register_changed_p (regnum, argp)
void *argp; /* Ignored */
{
char raw_buffer[MAX_REGISTER_RAW_SIZE];
- char buf[100];
if (read_relative_register_raw_bytes (regnum, raw_buffer))
return;
@@ -1251,7 +1288,8 @@ gdbtk_init ()
gdb_get_breakpoint_info, NULL);
command_loop_hook = tk_command_loop;
- print_frame_info_listing_hook = null_routine;
+ print_frame_info_listing_hook =
+ (void (*) PARAMS ((struct symtab *, int, int, int))) null_routine;
query_hook = gdbtk_query;
flush_hook = gdbtk_flush;
create_breakpoint_hook = gdbtk_create_breakpoint;
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index de15b5a..e9f6f8a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -54,6 +54,18 @@ struct type *builtin_type_complex;
struct type *builtin_type_double_complex;
struct type *builtin_type_string;
+struct extra { char str[128]; int len; }; /* maximum extention is 128! FIXME */
+
+static void add_name PARAMS ((struct extra *, char *));
+static void add_mangled_type PARAMS ((struct extra *, struct type *));
+#if 0
+static void cfront_mangle_name PARAMS ((struct type *, int, int));
+#endif
+static void print_bit_vector PARAMS ((B_TYPE *, int));
+static void print_arg_types PARAMS ((struct type **, int));
+static void dump_fn_fieldlists PARAMS ((struct type *, int));
+static void print_cplus_stuff PARAMS ((struct type *, int));
+
/* Alloc a new type structure and fill it with some defaults. If
OBJFILE is non-NULL, then allocate the space for the type structure
in that objfile's type_obstack. */
@@ -979,21 +991,21 @@ check_typedef (type)
#include <ctype.h>
#define INIT_EXTRA { pextras->len=0; pextras->str[0]='\0'; }
#define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
-struct extra { char str[128]; int len; }; /* maximum extention is 128! FIXME */
-void
+
+static void
add_name(pextras,n)
struct extra * pextras;
char * n;
{
- char lenstr[512]; /* FIXME! hardcoded :-( */
- int nlen, lenstrlen;
+ int nlen;
+
if ((nlen = (n ? strlen(n) : 0))==0)
return;
sprintf(pextras->str+pextras->len,"%d%s",nlen,n);
pextras->len=strlen(pextras->str);
}
-void
+static void
add_mangled_type(pextras,t)
struct extra * pextras;
struct type * t;
@@ -1116,7 +1128,8 @@ add_mangled_type(pextras,t)
add_mangled_type(pextras,t->target_type);
}
-char *
+#if 0
+void
cfront_mangle_name(type, i, j)
struct type *type;
int i;
@@ -1165,6 +1178,8 @@ cfront_mangle_name(type, i, j)
mangled_name = arm_mangled_name;
}
}
+#endif /* 0 */
+
#undef ADD_EXTRA
/* End of new code added to support parsing of Cfront stabs strings */
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 59313d7..3a40f1c 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -786,4 +786,8 @@ extern int can_dereference PARAMS ((struct type *));
extern void maintenance_print_type PARAMS ((char *, int));
#endif
+/* typeprint.c */
+
+extern void print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
+
#endif /* GDBTYPES_H */
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
index e1641f9..38f68e1 100644
--- a/gdb/hp300ux-nat.c
+++ b/gdb/hp300ux-nat.c
@@ -34,6 +34,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/file.h>
+static void
+fetch_inferior_register PARAMS ((int, unsigned int));
+
+static void
+store_inferior_register_1 PARAMS ((int, unsigned int, int));
+
+static void
+store_inferior_register PARAMS ((int, unsigned int));
+
/* Get kernel_u_addr using HPUX-style nlist(). */
CORE_ADDR kernel_u_addr;
@@ -138,7 +147,6 @@ store_inferior_register (regno, regaddr)
else
#endif /* not HPUX_VERSION_5 */
{
- char buf[MAX_REGISTER_RAW_SIZE];
register int i;
extern char registers[];
@@ -185,7 +193,6 @@ store_inferior_registers (regno)
{
struct user u;
register unsigned int ar0_offset;
- extern char registers[];
if (regno >= FP0_REGNUM)
{
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index dcb4584..101f4ed 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "inferior.h"
#include "target.h"
+#include "gdbcore.h"
/* Return the PC of the caller from the call frame. Assumes the subr prologue
has already been executed, and the frame pointer setup. If this is the
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index 5b7f477..a125ec2 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "frame.h"
#include "floatformat.h"
#include "target.h"
+#include "gdbcore.h"
static CORE_ADDR next_insn PARAMS ((CORE_ADDR memaddr,
unsigned int *pword1,
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 55c6894..75f957a 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -82,6 +82,8 @@ static void step_command PARAMS ((char *, int));
static void run_command PARAMS ((char *, int));
+static void breakpoint_auto_delete_contents PARAMS ((PTR));
+
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run.");
@@ -500,7 +502,8 @@ signal_command (signum_exp, from_tty)
/* Call breakpoint_auto_delete on the current contents of the bpstat
pointed to by arg (which is really a bpstat *). */
-void
+
+static void
breakpoint_auto_delete_contents (arg)
PTR arg;
{
@@ -1019,7 +1022,11 @@ do_registers_info (regnum, fpregs)
printf_filtered ("\t(raw 0x");
for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
- printf_filtered ("%02x", (unsigned char)raw_buffer[j]);
+ {
+ register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
+ : REGISTER_RAW_SIZE (i) - 1 - j;
+ printf_filtered ("%02x", (unsigned char)raw_buffer[idx]);
+ }
printf_filtered (")");
}
@@ -1137,7 +1144,9 @@ attach_command (args, from_tty)
char *args;
int from_tty;
{
+#ifdef SOLIB_ADD
extern int auto_solib_add;
+#endif
dont_repeat (); /* Not for the faint of heart */
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 23f828b..6c5b793 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -47,6 +47,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#endif /* sgtty */
+#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)
+static void
+handle_sigio PARAMS ((int));
+#endif
+
+static void
+pass_signal PARAMS ((int));
+
static void
kill_command PARAMS ((char *, int));
@@ -82,6 +90,7 @@ PROCESS_GROUP_TYPE inferior_process_group;
inferior only. If we have job control, that takes care of it. If not,
we save our handlers in these two variables and set SIGINT and SIGQUIT
to SIG_IGN. */
+
static void (*sigint_ours) ();
static void (*sigquit_ours) ();
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0089b7e..4cc423c 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -55,6 +55,8 @@ static void resume_cleanups PARAMS ((int));
static int hook_stop_stub PARAMS ((char *));
+static void delete_breakpoint_current_contents PARAMS ((PTR));
+
/* GET_LONGJMP_TARGET returns the PC at which longjmp() will resume the
program. It needs to examine the jmp_buf argument and extract the PC
from it. The return value is non-zero on success, zero otherwise. */
@@ -151,9 +153,11 @@ static struct symbol *step_start_function;
static int trap_expected;
+#ifdef SOLIB_ADD
/* Nonzero if we want to give control to the user when we're notified
of shared library events by the dynamic linker. */
static int stop_on_solib_events;
+#endif
#ifdef HP_OS_BUG
/* Nonzero if the next time we try to continue the inferior, it will
@@ -195,13 +199,6 @@ static int breakpoints_failed;
static int stop_print_frame;
-#ifdef NO_SINGLE_STEP
-extern int one_stepped; /* From machine dependent code */
-extern void single_step (); /* Same. */
-#endif /* NO_SINGLE_STEP */
-
-extern void write_pc_pid PARAMS ((CORE_ADDR, int));
-
/* Things to clean up if we QUIT out of resume (). */
/* ARGSUSED */
@@ -455,7 +452,7 @@ wait_for_inferior ()
struct cleanup *old_cleanups;
struct target_waitstatus w;
int another_trap;
- int random_signal;
+ int random_signal = 0;
CORE_ADDR stop_func_start;
CORE_ADDR stop_func_end;
char *stop_func_name;
@@ -1063,8 +1060,8 @@ wait_for_inferior ()
another_trap = 1;
break;
-#ifdef SOLIB_ADD
case BPSTAT_WHAT_CHECK_SHLIBS:
+#ifdef SOLIB_ADD
{
extern int auto_solib_add;
@@ -1104,6 +1101,7 @@ wait_for_inferior ()
}
}
#endif
+ break;
case BPSTAT_WHAT_LAST:
/* Not a real code, but listed here to shut up gcc -Wall. */
@@ -1187,7 +1185,8 @@ wait_for_inferior ()
/* Did we just take a signal? */
if (IN_SIGTRAMP (stop_pc, stop_func_name)
- && !IN_SIGTRAMP (prev_pc, prev_func_name))
+ && !IN_SIGTRAMP (prev_pc, prev_func_name)
+ && read_sp () INNER_THAN step_sp)
{
/* We've just taken a signal; go until we are back to
the point where we took it and one more. */
@@ -1251,16 +1250,17 @@ wait_for_inferior ()
SKIP_PROLOGUE (prologue_pc);
}
- if ((/* Might be a non-recursive call. If the symbols are missing
- enough that stop_func_start == prev_func_start even though
- they are really two functions, we will treat some calls as
- jumps. */
- stop_func_start != prev_func_start
-
- /* Might be a recursive call if either we have a prologue
- or the call instruction itself saves the PC on the stack. */
- || prologue_pc != stop_func_start
- || read_sp () != step_sp)
+ if (!(step_sp INNER_THAN read_sp ()) /* don't mistake (sig)return as a call */
+ && (/* Might be a non-recursive call. If the symbols are missing
+ enough that stop_func_start == prev_func_start even though
+ they are really two functions, we will treat some calls as
+ jumps. */
+ stop_func_start != prev_func_start
+
+ /* Might be a recursive call if either we have a prologue
+ or the call instruction itself saves the PC on the stack. */
+ || prologue_pc != stop_func_start
+ || read_sp () != step_sp)
&& (/* PC is completely out of bounds of any known objfiles. Treat
like a subroutine call. */
! stop_func_start
@@ -1519,12 +1519,14 @@ step_into_function:
}
step_range_start = sal.pc;
step_range_end = sal.end;
+ step_frame_address = FRAME_FP (get_current_frame ());
goto keep_going;
check_sigtramp2:
if (trap_expected
&& IN_SIGTRAMP (stop_pc, stop_func_name)
- && !IN_SIGTRAMP (prev_pc, prev_func_name))
+ && !IN_SIGTRAMP (prev_pc, prev_func_name)
+ && read_sp () INNER_THAN step_sp)
{
/* What has happened here is that we have just stepped the inferior
with a signal (because it is a signal which shouldn't make
diff --git a/gdb/language.c b/gdb/language.c
index 51ce181..61a95d8 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -88,6 +88,25 @@ set_check PARAMS ((char *, int));
static void
set_type_range PARAMS ((void));
+static void
+unk_lang_printchar PARAMS ((int, GDB_FILE *));
+
+static void
+unk_lang_printstr PARAMS ((GDB_FILE *, char *, unsigned int, int));
+
+static struct type *
+unk_lang_create_fundamental_type PARAMS ((struct objfile *, int));
+
+static void
+unk_lang_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+
+static int
+unk_lang_val_print PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
+ int, int, int, enum val_prettyprint));
+
+static int
+unk_lang_value_print PARAMS ((value_ptr, GDB_FILE *, int, enum val_prettyprint));
+
/* Forward declaration */
extern const struct language_defn unknown_language_defn;
extern char *warning_pre_print;
@@ -1219,7 +1238,7 @@ unk_lang_create_fundamental_type (objfile, typeid)
error ("internal error - unimplemented function unk_lang_create_fundamental_type called.");
}
-void
+static void
unk_lang_print_type (type, varstring, stream, show, level)
struct type *type;
char *varstring;
@@ -1230,7 +1249,7 @@ unk_lang_print_type (type, varstring, stream, show, level)
error ("internal error - unimplemented function unk_lang_print_type called.");
}
-int
+static int
unk_lang_val_print (type, valaddr, address, stream, format, deref_ref,
recurse, pretty)
struct type *type;
@@ -1245,7 +1264,7 @@ unk_lang_val_print (type, valaddr, address, stream, format, deref_ref,
error ("internal error - unimplemented function unk_lang_val_print called.");
}
-int
+static int
unk_lang_value_print (val, stream, format, pretty)
value_ptr val;
GDB_FILE *stream;
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index 7502033..b25dda3 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -26,6 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "m2-lang.h"
#include "c-lang.h"
+static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int));
+static void m2_printstr PARAMS ((GDB_FILE *, char *, unsigned int, int));
+static void m2_printchar PARAMS ((int, GDB_FILE *));
+static void emit_char PARAMS ((int, GDB_FILE *, int));
+
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
characters and strings is language specific.
diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c
index 28ea3b1..91e24b7 100644
--- a/gdb/m2-valprint.c
+++ b/gdb/m2-valprint.c
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "symtab.h"
#include "gdbtypes.h"
#include "valprint.h"
+#include "m2-lang.h"
/* FIXME: For now, just explicitly declare c_val_print and use it instead */
diff --git a/gdb/mac-nat.c b/gdb/mac-nat.c
index f827fca..b31772d 100644
--- a/gdb/mac-nat.c
+++ b/gdb/mac-nat.c
@@ -45,6 +45,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern struct target_ops child_ops;
+static void child_stop PARAMS ((void));
+
static void
child_fetch_inferior_registers (int r)
{
@@ -224,7 +226,7 @@ child_mourn_inferior ()
generic_mourn_inferior ();
}
-void
+static void
child_stop ()
{
}
diff --git a/gdb/maint.c b/gdb/maint.c
index 9ce342c..312195c 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -49,6 +49,14 @@ static void maintenance_time_display PARAMS ((char *, int));
static void maintenance_space_display PARAMS ((char *, int));
+static void maintenance_info_command PARAMS ((char *, int));
+
+static void print_section_table PARAMS ((bfd *, asection *, PTR));
+
+static void maintenance_info_sections PARAMS ((char *, int));
+
+static void maintenance_print_command PARAMS ((char *, int));
+
/* Set this to the maximum number of seconds to wait instead of waiting forever
in target_wait(). If this timer times out, then it generates an error and
the command is aborted. This replaces most of the need for timeouts in the
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 1aa2bf5..67ded75 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -305,6 +305,24 @@ static int found_ecoff_debugging_info;
/* Forward declarations */
+static void
+add_pending PARAMS ((FDR *, char *, struct type *));
+
+static struct mdebug_pending *
+is_pending_symbol PARAMS ((FDR *, char *));
+
+static void
+pop_parse_stack PARAMS ((void));
+
+static void
+push_parse_stack PARAMS ((void));
+
+static char *
+fdr_name PARAMS ((FDR *));
+
+static void
+mdebug_psymtab_to_symtab PARAMS ((struct partial_symtab *));
+
static int
upgrade_type PARAMS ((int, struct type **, int, union aux_ext *, int, char *));
diff --git a/gdb/nindy-tdep.c b/gdb/nindy-tdep.c
index 76f04e4..3fccd4f 100644
--- a/gdb/nindy-tdep.c
+++ b/gdb/nindy-tdep.c
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "symtab.h"
#include "frame.h"
+#include "gdbcore.h"
/* 'start_frame' is a variable in the NINDY runtime startup routine
that contains the frame pointer of the 'start' routine (the routine
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index f31bd38..f135720 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -35,6 +35,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "obstack.h"
#include "gdb_string.h"
+/* FIXME: imported from mdebugread.c */
+
+extern void ecoff_relocate_efi PARAMS ((struct symbol *, CORE_ADDR));
+
/* Prototypes for local functions */
#if !defined(NO_MMALLOC) && defined(HAVE_MMAP)
@@ -45,14 +49,14 @@ open_existing_mapped_file PARAMS ((char *, long, int));
static int
open_mapped_file PARAMS ((char *filename, long mtime, int mapped));
-static CORE_ADDR
-map_to_address PARAMS ((void));
-
static PTR
map_to_file PARAMS ((int));
#endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
+static void
+add_to_objfile_sections PARAMS ((bfd *, sec_ptr, PTR));
+
/* Externally visible variables that are owned by this module.
See declarations in objfile.h for more info. */
@@ -543,7 +547,7 @@ objfile_relocate (objfile, new_offsets)
if (SYMBOL_CLASS (sym) == LOC_CONST
&& SYMBOL_NAMESPACE (sym) == LABEL_NAMESPACE
&& STRCMP (SYMBOL_NAME (sym), MIPS_EFI_SYMBOL_NAME) == 0)
- ecoff_relocate_efi (sym, ANOFFSET (delta, s->block_line_section));
+ ecoff_relocate_efi (sym, ANOFFSET (delta, s->block_line_section));
#endif
}
}
@@ -825,59 +829,12 @@ open_mapped_file (filename, mtime, mapped)
return (fd);
}
-/* Return the base address at which we would like the next objfile's
- mapped data to start.
-
- For now, we use the kludge that the configuration specifies a base
- address to which it is safe to map the first mmalloc heap, and an
- increment to add to this address for each successive heap. There are
- a lot of issues to deal with here to make this work reasonably, including:
-
- Avoid memory collisions with existing mapped address spaces
-
- Reclaim address spaces when their mmalloc heaps are unmapped
-
- When mmalloc heaps are shared between processes they have to be
- mapped at the same addresses in each
-
- Once created, a mmalloc heap that is to be mapped back in must be
- mapped at the original address. I.E. each objfile will expect to
- be remapped at it's original address. This becomes a problem if
- the desired address is already in use.
-
- etc, etc, etc.
-
- */
-
-
-static CORE_ADDR
-map_to_address ()
-{
-
-#if defined(MMAP_BASE_ADDRESS) && defined (MMAP_INCREMENT)
-
- static CORE_ADDR next = MMAP_BASE_ADDRESS;
- CORE_ADDR mapto = next;
-
- next += MMAP_INCREMENT;
- return (mapto);
-
-#else
-
- warning ("need to recompile gdb with MMAP_BASE_ADDRESS and MMAP_INCREMENT defined");
- return (0);
-
-#endif
-
-}
-
static PTR
map_to_file (fd)
int fd;
{
PTR md;
CORE_ADDR mapto;
- int tempfd;
md = mmalloc_attach (fd, (PTR) 0);
if (md != NULL)
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index b98b708..f5c1bb9 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -454,6 +454,9 @@ have_minimal_symbols PARAMS ((void));
extern struct obj_section *
find_pc_section PARAMS((CORE_ADDR pc));
+extern int
+in_plt_section PARAMS ((CORE_ADDR, char *));
+
/* Traverse all object files. ALL_OBJFILES_SAFE works even if you delete
the objfile during the traversal. */
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 8d01a8e..d79e732 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -125,6 +125,10 @@ static struct complaint lbrac_mismatch_complaint =
#endif
/* Local function prototypes */
+
+static void
+read_minimal_symbols PARAMS ((struct objfile *, struct section_offsets *));
+
static void
os9k_read_ofile_symtab PARAMS ((struct partial_symtab *));
diff --git a/gdb/procfs.c b/gdb/procfs.c
index eceb8ba..8a2eda4 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -119,8 +119,6 @@ static struct pollfd *poll_list; /* pollfds used for waiting on /proc */
static int num_poll_list = 0; /* Number of entries in poll_list */
-static int last_resume_pid = -1; /* Last pid used with procfs_resume */
-
/* Much of the information used in the /proc interface, particularly for
printing status information, is kept as tables of structures of the
following form. These tables can be used to map numeric values to
@@ -368,6 +366,50 @@ static char *syscall_table[MAX_SYSCALLS];
/* Prototypes for local functions */
+static void procfs_stop PARAMS ((void));
+
+static int procfs_thread_alive PARAMS ((int));
+
+static int procfs_can_run PARAMS ((void));
+
+static void procfs_mourn_inferior PARAMS ((void));
+
+static void procfs_fetch_registers PARAMS ((int));
+
+static int procfs_wait PARAMS ((int, struct target_waitstatus *));
+
+static void procfs_open PARAMS ((char *, int));
+
+static void procfs_files_info PARAMS ((struct target_ops *));
+
+static void procfs_prepare_to_store PARAMS ((void));
+
+static void procfs_detach PARAMS ((char *, int));
+
+static void procfs_attach PARAMS ((char *, int));
+
+static void proc_set_exec_trap PARAMS ((void));
+
+static int procfs_init_inferior PARAMS ((int));
+
+static struct procinfo *create_procinfo PARAMS ((int));
+
+static void procfs_store_registers PARAMS ((int));
+
+static int procfs_xfer_memory PARAMS ((CORE_ADDR, char *, int, int, struct target_ops *));
+
+static void procfs_kill_inferior PARAMS ((void));
+
+static char *sigcodedesc PARAMS ((siginfo_t *));
+
+static char *sigcodename PARAMS ((siginfo_t *));
+
+static struct procinfo *wait_fd PARAMS ((void));
+
+static void remove_fd PARAMS ((struct procinfo *));
+
+static void add_fd PARAMS ((struct procinfo *));
+
static void set_proc_siginfo PARAMS ((struct procinfo *, int));
static void init_syscall_table PARAMS ((void));
@@ -587,8 +629,10 @@ static struct procinfo *
wait_fd ()
{
struct procinfo *pi;
+#ifndef LOSING_POLL
int num_fds;
int i;
+#endif
set_sigint_trap (); /* Causes SIGINT to be passed on to the
attached process. */
@@ -2287,7 +2331,6 @@ static int
do_attach (pid)
int pid;
{
- int result;
struct procinfo *pi;
pi = (struct procinfo *) xmalloc (sizeof (struct procinfo));
@@ -2411,7 +2454,6 @@ static void
do_detach (signal)
int signal;
{
- int result;
struct procinfo *pi;
pi = current_procinfo;
@@ -3833,7 +3875,9 @@ modify_inherit_on_fork_flag (fd, flag)
int fd;
int flag;
{
+#ifdef PIOCSET
long pr_flags;
+#endif
int retval;
#ifdef PIOCSET /* New method */
@@ -3884,7 +3928,9 @@ modify_run_on_last_close_flag (fd, flag)
int fd;
int flag;
{
+#ifdef PIOCSET
long pr_flags;
+#endif
int retval;
#ifdef PIOCSET /* New method */
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 07a89c1..7088e8b 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -57,8 +57,6 @@
#define ACK 0x06
#define CTRLZ 0x1a
-extern void notice_quit PARAMS ((void));
-
extern void report_transfer_performance PARAMS ((unsigned long,
time_t, time_t));
diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c
index cbbdeaf..b55e32b 100644
--- a/gdb/remote-utils.c
+++ b/gdb/remote-utils.c
@@ -69,6 +69,9 @@ struct _sr_settings sr_settings = {
struct gr_settings *gr_settings = NULL;
+static void usage PARAMS ((char *, char *));
+static void sr_com PARAMS ((char *, int));
+
static void
usage(proto, junk)
char *proto;
@@ -380,7 +383,7 @@ sr_get_hex_word ()
prompt from the remote is seen.
FIXME: Can't handle commands that take input. */
-void
+static void
sr_com (args, fromtty)
char *args;
int fromtty;
diff --git a/gdb/remote.c b/gdb/remote.c
index 1f3b279..65caedb 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -266,6 +266,18 @@ static void remote_interrupt_twice PARAMS ((int signo));
static void interrupt_query PARAMS ((void));
+static void set_thread PARAMS ((int, int));
+
+static int remote_thread_alive PARAMS ((int));
+
+static void get_offsets PARAMS ((void));
+
+static int read_frame PARAMS ((char *));
+
+static int remote_insert_breakpoint PARAMS ((CORE_ADDR, char *));
+
+static int remote_remove_breakpoint PARAMS ((CORE_ADDR, char *));
+
extern struct target_ops remote_ops; /* Forward decl */
extern struct target_ops extended_remote_ops; /* Forward decl */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 85b01e3..190689a 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -118,7 +118,7 @@ branch_dest (opcode, instr, pc, safety)
void
single_step (signal)
- int signal;
+ enum target_signal signal;
{
#define INSNLEN(OPCODE) 4
diff --git a/gdb/scm-exp.c b/gdb/scm-exp.c
index 8df6803..70e7191 100644
--- a/gdb/scm-exp.c
+++ b/gdb/scm-exp.c
@@ -30,15 +30,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define USE_EXPRSTRING 0
+static void scm_lreadparen PARAMS ((int));
+static int scm_skip_ws PARAMS ((void));
+static void scm_read_token PARAMS ((int, int));
+static LONGEST scm_istring2number PARAMS ((char *, int, int));
+static LONGEST scm_istr2int PARAMS ((char *, int, int));
static void scm_lreadr PARAMS ((int));
-LONGEST
+static LONGEST
scm_istr2int(str, len, radix)
char *str;
int len;
int radix;
{
- int j;
int i = 0;
LONGEST inum = 0;
int c;
@@ -78,7 +82,7 @@ scm_istr2int(str, len, radix)
return SCM_MAKINUM (inum);
}
-LONGEST
+static LONGEST
scm_istring2number(str, len, radix)
char *str;
int len;
@@ -87,7 +91,9 @@ scm_istring2number(str, len, radix)
int i = 0;
char ex = 0;
char ex_p = 0, rx_p = 0; /* Only allow 1 exactness and 1 radix prefix */
+#if 0
SCM res;
+#endif
if (len==1)
if (*str=='+' || *str=='-') /* Catches lone `+' and `-' for speed */
return SCM_BOOL_F;
@@ -319,7 +325,9 @@ scm_lreadr (skipping)
goto tryagain;
case '.':
default:
+#if 0
callshrp:
+#endif
scm_lreadr (skipping);
return;
}
@@ -365,7 +373,9 @@ scm_lreadr (skipping)
case ':':
scm_read_token ('-', 0);
return;
+#if 0
do_symbol:
+#endif
default:
str.ptr = lexptr-1;
scm_read_token (c, 0);
@@ -398,7 +408,6 @@ int
scm_parse ()
{
char* start;
- struct stoken str;
while (*lexptr == ' ')
lexptr++;
start = lexptr;
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index b054dcf..c54b2c1 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -28,10 +28,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "scm-lang.h"
#include "scm-tags.h"
#include "gdb_string.h"
+#include "gdbcore.h"
+
+static value_ptr evaluate_subexp_scm PARAMS ((struct type *, struct expression *,
+ int *, enum noside));
+static value_ptr scm_lookup_name PARAMS ((char *));
+static int in_eval_c PARAMS ((void));
+static void scm_printstr PARAMS ((GDB_FILE *, char *, unsigned int, int));
extern struct type ** const (c_builtin_types[]);
-extern value_ptr value_allocate_space_in_inferior PARAMS ((int));
-extern value_ptr find_function_in_inferior PARAMS ((char*));
struct type *builtin_type_scm;
@@ -73,7 +78,6 @@ scm_get_field (svalue, index)
LONGEST svalue;
int index;
{
- value_ptr val;
char buffer[20];
read_memory (SCM2PTR (svalue) + index * TYPE_LENGTH (builtin_type_scm),
buffer, TYPE_LENGTH (builtin_type_scm));
@@ -148,13 +152,13 @@ in_eval_c ()
First lookup in Scheme context (using the scm_lookup_cstr inferior
function), then try lookup_symbol for compiled variables. */
-value_ptr
+static value_ptr
scm_lookup_name (str)
char *str;
{
value_ptr args[3];
int len = strlen (str);
- value_ptr symval, func, val;
+ value_ptr func, val;
struct symbol *sym;
args[0] = value_allocate_space_in_inferior (len);
args[1] = value_from_longest (builtin_type_int, len);
diff --git a/gdb/scm-lang.h b/gdb/scm-lang.h
index f990d77..f122527 100644
--- a/gdb/scm-lang.h
+++ b/gdb/scm-lang.h
@@ -34,7 +34,7 @@ extern int scm_val_print PARAMS ((struct type*, char*, CORE_ADDR, GDB_FILE*,
extern LONGEST scm_get_field PARAMS ((LONGEST, int));
-extern int scm_scmval_print PARAMS ((LONGEST, GDB_FILE *,
+extern void scm_scmval_print PARAMS ((LONGEST, GDB_FILE *,
int, int, int, enum val_prettyprint));
extern int is_scmvalue_type PARAMS ((struct type*));
@@ -45,6 +45,6 @@ extern struct value * scm_evaluate_string PARAMS ((char*, int));
extern struct type *builtin_type_scm;
-extern int scm_parse ();
+extern int scm_parse PARAMS ((void));
extern LONGEST scm_unpack PARAMS ((struct type *, char *, enum type_code));
diff --git a/gdb/scm-valprint.c b/gdb/scm-valprint.c
index 8544870..d05b7ee 100644
--- a/gdb/scm-valprint.c
+++ b/gdb/scm-valprint.c
@@ -26,12 +26,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "value.h"
#include "scm-lang.h"
#include "valprint.h"
+#include "gdbcore.h"
+
+/* FIXME: Should be in a header file that we import. */
+extern int
+c_val_print PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *, int, int,
+ int, enum val_prettyprint));
+
+static void scm_ipruk PARAMS ((char *, LONGEST, GDB_FILE *));
+static void scm_scmlist_print PARAMS ((LONGEST, GDB_FILE *, int, int,
+ int, enum val_prettyprint));
+static int scm_inferior_print PARAMS ((LONGEST, GDB_FILE *, int, int,
+ int, enum val_prettyprint));
/* Prints the SCM value VALUE by invoking the inferior, if appropraite.
Returns >= 0 on succes; retunr -1 if the inferior cannot/should not
print VALUE. */
-int
+static int
scm_inferior_print (value, stream, format, deref_ref, recurse, pretty)
LONGEST value;
GDB_FILE *stream;
@@ -82,7 +94,7 @@ static char *scm_isymnames[] =
"#<unspecified>"
};
-static int
+static void
scm_scmlist_print (svalue, stream, format, deref_ref, recurse, pretty)
LONGEST svalue;
GDB_FILE *stream;
@@ -95,7 +107,7 @@ scm_scmlist_print (svalue, stream, format, deref_ref, recurse, pretty)
if (recurse > 6)
{
fputs_filtered ("...", stream);
- return 0;
+ return;
}
scm_scmval_print (SCM_CAR (svalue), stream, format,
deref_ref, recurse + 1, pretty);
@@ -135,7 +147,7 @@ scm_ipruk (hdr, ptr, stream)
fprintf_filtered (stream, " 0x%x>", ptr);
}
-int
+void
scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
LONGEST svalue;
GDB_FILE *stream;
@@ -191,7 +203,9 @@ scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
case scm_tcs_cons_gloc:
if (SCM_CDR (SCM_CAR (svalue) - 1L) == 0)
{
+#if 0
SCM name;
+#endif
fputs_filtered ("#<latte ", stream);
#if 1
fputs_filtered ("???", stream);
@@ -351,7 +365,10 @@ scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
goto punk;
#endif
default:
- punk:scm_ipruk ("type", svalue, stream);
+#if 0
+ punk:
+#endif
+ scm_ipruk ("type", svalue, stream);
}
break;
}
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 388293f..1fb0db4 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -45,6 +45,10 @@ static int tcp_write PARAMS ((serial_t scb, const char *str, int len));
static void tcp_close PARAMS ((serial_t scb));
static serial_ttystate tcp_get_tty_state PARAMS ((serial_t scb));
static int tcp_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
+static int tcp_return_0 PARAMS ((serial_t));
+static int tcp_noflush_set_tty_state PARAMS ((serial_t, serial_ttystate,
+ serial_ttystate));
+static void tcp_print_tty_state PARAMS ((serial_t, serial_ttystate));
/* Open up a raw tcp socket */
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index a4a00e5..a77da59 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -69,12 +69,18 @@ static int hardwire_readchar PARAMS ((serial_t scb, int timeout));
static int rate_to_code PARAMS ((int rate));
static int hardwire_setbaudrate PARAMS ((serial_t scb, int rate));
static int hardwire_write PARAMS ((serial_t scb, const char *str, int len));
-/* FIXME: static void hardwire_restore PARAMS ((serial_t scb)); */
static void hardwire_close PARAMS ((serial_t scb));
static int get_tty_state PARAMS ((serial_t scb, struct hardwire_ttystate *state));
static int set_tty_state PARAMS ((serial_t scb, struct hardwire_ttystate *state));
static serial_ttystate hardwire_get_tty_state PARAMS ((serial_t scb));
static int hardwire_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
+static int hardwire_noflush_set_tty_state PARAMS ((serial_t, serial_ttystate,
+ serial_ttystate));
+static void hardwire_print_tty_state PARAMS ((serial_t, serial_ttystate));
+static int hardwire_flush_output PARAMS ((serial_t));
+static int hardwire_flush_input PARAMS ((serial_t));
+static int hardwire_send_break PARAMS ((serial_t));
+static int hardwire_setstopbits PARAMS ((serial_t, int));
/* Open up a real live device for serial I/O */
diff --git a/gdb/serial.c b/gdb/serial.c
index 18c6cde..151881a 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -41,6 +41,9 @@ static serial_t scb_base;
char *serial_logfile = NULL;
FILE *serial_logfp = NULL;
+static struct serial_ops *serial_interface_lookup PARAMS ((char *));
+static void serial_logchar PARAMS ((int));
+
static int serial_reading = 0;
static int serial_writing = 0;
diff --git a/gdb/serial.h b/gdb/serial.h
index 8abcb3d..ca4639c 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -179,4 +179,6 @@ extern void serial_printf PARAMS ((serial_t desc, const char *, ...))
extern char *serial_logfile;
extern FILE *serial_logfp;
+extern void serial_log_command PARAMS ((const char *));
+
#endif /* SERIAL_H */
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 406238d..feb9776 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -38,6 +38,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STACK_REGS 2
#define FP_REGS 4
+static void
+fetch_core_registers PARAMS ((char *, unsigned int, int, unsigned int));
+
/* Fetch one or more registers from the inferior. REGNO == -1 to get
them all. We actually fetch more than requested, when convenient,
marking them as valid so we won't fetch them again. */
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 67b39f9..b4ff17f 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -75,6 +75,13 @@ struct field_info
} *fnlist;
};
+static void
+read_one_struct_field PARAMS ((struct field_info *, char **, char *,
+ struct type *, struct objfile *));
+
+static char *
+get_substring PARAMS ((char **, char));
+
static struct type *
dbx_alloc_type PARAMS ((int [2], struct objfile *));
@@ -145,10 +152,6 @@ read_cpp_abbrev PARAMS ((struct field_info *, char **, struct type *,
/* new functions added for cfront support */
-extern void
-resolve_cfront_continuation PARAMS ((struct objfile *, struct symbol *,
- char * p));
-
static int
copy_cfront_struct_fields PARAMS ((struct field_info *, struct type *,
struct objfile *));
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 090de16..0a1d165 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -163,6 +163,10 @@ end_stabs PARAMS ((void));
extern void
finish_global_stabs PARAMS ((struct objfile *objfile));
+
+extern void
+resolve_cfront_continuation PARAMS((struct objfile * objfile,
+ struct symbol * sym, char * p));
EXTERN int os9k_stabs;
@@ -228,4 +232,6 @@ extern void stabsect_build_psymtabs
extern void elfstab_offset_sections PARAMS ((struct objfile *,
struct partial_symtab *));
+extern void process_later PARAMS ((struct symbol *, char *));
+
#undef EXTERN
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1d91e7f..79f33e2 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -90,6 +90,8 @@ static bfd *symfile_bfd_open PARAMS ((char *));
static void find_sym_fns PARAMS ((struct objfile *));
+static void decrement_reading_symtab PARAMS ((void *));
+
/* List of all available sym_fns. On gdb startup, each object file reader
calls add_symtab_fns() to register information on each format it is
prepared to read. */
@@ -963,7 +965,7 @@ generic_load (filename, from_tty)
char buf[128];
/* enable user to specify address for downloading as 2nd arg to load */
- n = sscanf(filename, "%s 0x%x", buf, &load_offset);
+ n = sscanf(filename, "%s 0x%lx", buf, &load_offset);
if (n > 1 )
filename = buf;
else
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 302f0cf..92bff76 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -89,6 +89,9 @@ lookup_partial_symbol PARAMS ((struct partial_symtab *, const char *,
static struct symtab *
lookup_symtab_1 PARAMS ((char *));
+static void
+cplusplus_hint PARAMS ((char *));
+
/* */
/* The single non-language-specific builtin type */
@@ -106,7 +109,7 @@ char no_symtab_msg[] = "No symbol table is loaded. Use the \"file\" command.";
using the new command completion feature on single quoted demangled C++
symbols. Remove when loose ends are cleaned up. FIXME -fnf */
-void
+static void
cplusplus_hint (name)
char *name;
{
@@ -325,7 +328,7 @@ gdb_mangle_name (type, i, j)
work with the normal mechanisms. */
if (OPNAME_PREFIX_P (field_name))
{
- char *opname = cplus_mangle_opname (field_name + 3, 0);
+ const char *opname = cplus_mangle_opname (field_name + 3, 0);
if (opname == NULL)
error ("No mangling for \"%s\"", field_name);
mangled_name_len += strlen (opname);
@@ -408,7 +411,7 @@ find_pc_psymbol (psymtab, pc)
struct partial_symtab *psymtab;
CORE_ADDR pc;
{
- struct partial_symbol *best = NULL, *p;
+ struct partial_symbol *best = NULL, *p, **pp;
CORE_ADDR best_pc;
if (!psymtab)
@@ -421,30 +424,36 @@ find_pc_psymbol (psymtab, pc)
/* Search the global symbols as well as the static symbols, so that
find_pc_partial_function doesn't use a minimal symbol and thus
cache a bad endaddr. */
- for (p = psymtab->objfile->global_psymbols.list + psymtab->globals_offset;
- (p - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset)
+ for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset;
+ (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset)
< psymtab->n_global_syms);
- p++)
- if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE
- && SYMBOL_CLASS (p) == LOC_BLOCK
- && pc >= SYMBOL_VALUE_ADDRESS (p)
- && SYMBOL_VALUE_ADDRESS (p) > best_pc)
- {
- best_pc = SYMBOL_VALUE_ADDRESS (p);
- best = p;
- }
- for (p = psymtab->objfile->static_psymbols.list + psymtab->statics_offset;
- (p - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset)
+ pp++)
+ {
+ p = *pp;
+ if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE
+ && SYMBOL_CLASS (p) == LOC_BLOCK
+ && pc >= SYMBOL_VALUE_ADDRESS (p)
+ && SYMBOL_VALUE_ADDRESS (p) > best_pc)
+ {
+ best_pc = SYMBOL_VALUE_ADDRESS (p);
+ best = p;
+ }
+ }
+ for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset;
+ (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset)
< psymtab->n_static_syms);
- p++)
- if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE
- && SYMBOL_CLASS (p) == LOC_BLOCK
- && pc >= SYMBOL_VALUE_ADDRESS (p)
- && SYMBOL_VALUE_ADDRESS (p) > best_pc)
- {
- best_pc = SYMBOL_VALUE_ADDRESS (p);
- best = p;
- }
+ pp++)
+ {
+ p = *pp;
+ if (SYMBOL_NAMESPACE (p) == VAR_NAMESPACE
+ && SYMBOL_CLASS (p) == LOC_BLOCK
+ && pc >= SYMBOL_VALUE_ADDRESS (p)
+ && SYMBOL_VALUE_ADDRESS (p) > best_pc)
+ {
+ best_pc = SYMBOL_VALUE_ADDRESS (p);
+ best = p;
+ }
+ }
if (best_pc == psymtab->textlow - 1)
return 0;
return best;
@@ -703,8 +712,8 @@ lookup_partial_symbol (pst, name, global, namespace)
int global;
namespace_enum namespace;
{
- struct partial_symbol *start, *psym;
- struct partial_symbol *top, *bottom, *center;
+ struct partial_symbol **start, **psym;
+ struct partial_symbol **top, **bottom, **center;
int length = (global ? pst->n_global_syms : pst->n_static_syms);
int do_linear_search = 1;
@@ -733,11 +742,11 @@ lookup_partial_symbol (pst, name, global, namespace)
center = bottom + (top - bottom) / 2;
if (!(center < top))
abort ();
- if (!do_linear_search && SYMBOL_LANGUAGE (center) == language_cplus)
+ if (!do_linear_search && SYMBOL_LANGUAGE (*center) == language_cplus)
{
do_linear_search = 1;
}
- if (STRCMP (SYMBOL_NAME (center), name) >= 0)
+ if (STRCMP (SYMBOL_NAME (*center), name) >= 0)
{
top = center;
}
@@ -748,11 +757,11 @@ lookup_partial_symbol (pst, name, global, namespace)
}
if (!(top == bottom))
abort ();
- while (STREQ (SYMBOL_NAME (top), name))
+ while (STREQ (SYMBOL_NAME (*top), name))
{
- if (SYMBOL_NAMESPACE (top) == namespace)
+ if (SYMBOL_NAMESPACE (*top) == namespace)
{
- return top;
+ return (*top);
}
top ++;
}
@@ -765,11 +774,11 @@ lookup_partial_symbol (pst, name, global, namespace)
{
for (psym = start; psym < start + length; psym++)
{
- if (namespace == SYMBOL_NAMESPACE (psym))
+ if (namespace == SYMBOL_NAMESPACE (*psym))
{
- if (SYMBOL_MATCHES_NAME (psym, name))
+ if (SYMBOL_MATCHES_NAME (*psym, name))
{
- return (psym);
+ return (*psym);
}
}
}
@@ -993,7 +1002,7 @@ find_pc_symtab (pc)
/* For an objfile that has its functions reordered,
find_pc_psymtab will find the proper partial symbol table
and we simply return its corresponding symtab. */
- if (objfile->flags & OBJF_REORDERED)
+ if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs)
{
ps = find_pc_psymtab (pc);
if (ps)
@@ -1208,7 +1217,8 @@ find_pc_line (pc, notcurrent)
for (i = 0; i < len; i++, item++)
{
- /* Return the last line that did not start after PC. */
+ /* Leave prev pointing to the linetable entry for the last line
+ that started at or before PC. */
if (item->pc > pc)
break;
@@ -2601,7 +2611,7 @@ list_symbols (regexp, class, bpt, from_tty)
register struct block *b;
register int i, j;
register struct symbol *sym;
- struct partial_symbol *psym;
+ struct partial_symbol **psym;
struct objfile *objfile;
struct minimal_symbol *msymbol;
char *val;
@@ -2664,7 +2674,7 @@ list_symbols (regexp, class, bpt, from_tty)
ALL_PSYMTABS (objfile, ps)
{
- struct partial_symbol *bound, *gbound, *sbound;
+ struct partial_symbol **bound, **gbound, **sbound;
int keep_going = 1;
if (ps->readin) continue;
@@ -2695,12 +2705,12 @@ list_symbols (regexp, class, bpt, from_tty)
/* If it would match (logic taken from loop below)
load the file and go on to the next one */
- if ((regexp == NULL || SYMBOL_MATCHES_REGEXP (psym))
- && ((class == 0 && SYMBOL_CLASS (psym) != LOC_TYPEDEF
- && SYMBOL_CLASS (psym) != LOC_BLOCK)
- || (class == 1 && SYMBOL_CLASS (psym) == LOC_BLOCK)
- || (class == 2 && SYMBOL_CLASS (psym) == LOC_TYPEDEF)
- || (class == 3 && SYMBOL_CLASS (psym) == LOC_BLOCK)))
+ if ((regexp == NULL || SYMBOL_MATCHES_REGEXP (*psym))
+ && ((class == 0 && SYMBOL_CLASS (*psym) != LOC_TYPEDEF
+ && SYMBOL_CLASS (*psym) != LOC_BLOCK)
+ || (class == 1 && SYMBOL_CLASS (*psym) == LOC_BLOCK)
+ || (class == 2 && SYMBOL_CLASS (*psym) == LOC_TYPEDEF)
+ || (class == 3 && SYMBOL_CLASS (*psym) == LOC_BLOCK)))
{
PSYMTAB_TO_SYMTAB(ps);
keep_going = 0;
@@ -3079,7 +3089,7 @@ make_symbol_completion_list (text, word)
register struct objfile *objfile;
register struct block *b, *surrounding_static_block = 0;
register int i, j;
- struct partial_symbol *psym;
+ struct partial_symbol **psym;
/* The symbol we are completing on. Points in same buffer as text. */
char *sym_text;
/* Length of sym_text. */
@@ -3157,7 +3167,7 @@ make_symbol_completion_list (text, word)
{
/* If interrupted, then quit. */
QUIT;
- COMPLETION_LIST_ADD_SYMBOL (psym, sym_text, sym_text_len, text, word);
+ COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word);
}
for (psym = objfile->static_psymbols.list + ps->statics_offset;
@@ -3166,7 +3176,7 @@ make_symbol_completion_list (text, word)
psym++)
{
QUIT;
- COMPLETION_LIST_ADD_SYMBOL (psym, sym_text, sym_text_len, text, word);
+ COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word);
}
}
diff --git a/gdb/thread.c b/gdb/thread.c
index 88da480..2d1826a 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -58,13 +58,29 @@ struct thread_info
static struct thread_info *thread_list = NULL;
static int highest_thread_num;
-static void thread_command PARAMS ((char * tidstr, int from_tty));
+static void
+thread_command PARAMS ((char * tidstr, int from_tty));
+
+static void
+prune_threads PARAMS ((void));
+
+static void
+thread_switch PARAMS ((int pid));
+
+static struct thread_info *
+find_thread_id PARAMS ((int num));
+
+static void
+info_threads_command PARAMS ((char *, int));
-static void prune_threads PARAMS ((void));
+static void
+restore_current_thread PARAMS ((int));
-static void thread_switch PARAMS ((int pid));
+static void
+thread_apply_all_command PARAMS ((char *, int));
-static struct thread_info * find_thread_id PARAMS ((int num));
+static void
+thread_apply_command PARAMS ((char *, int));
void
init_thread_list ()
diff --git a/gdb/top.c b/gdb/top.c
index ea217c2..89c0e16 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -55,12 +55,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdb_stat.h"
#include <ctype.h>
-extern void initialize_targets PARAMS ((void));
-
extern void initialize_utils PARAMS ((void));
/* Prototypes for local functions */
+static void dont_repeat_command PARAMS ((char *, int));
+
+static void source_cleanup_lines PARAMS ((PTR));
+
+static void user_defined_command PARAMS ((char *, int));
+
+static void init_signals PARAMS ((void));
+
+#ifdef STOP_SIGNAL
+static void stop_sig PARAMS ((int));
+#endif
+
+static void disconnect PARAMS ((int));
+
static char * line_completion_function PARAMS ((char *, int, char *, int));
static char * readline_line_completion_function PARAMS ((char *, int));
@@ -393,7 +405,7 @@ void (*print_frame_info_listing_hook) PARAMS ((struct symtab *s, int line,
int stopline, int noerror));
/* Replaces most of query. */
-int (*query_hook) PARAMS (());
+int (*query_hook) PARAMS ((const char *, va_list));
/* Called from gdb_flush to flush output. */
@@ -446,7 +458,7 @@ void (*call_command_hook) PARAMS ((struct cmd_list_element *c, char *cmd,
/* Takes control from error (). Typically used to prevent longjmps out of the
middle of the GUI. Usually used in conjunction with a catch routine. */
-NORETURN void (*error_hook) PARAMS (()) ATTR_NORETURN;
+NORETURN void (*error_hook) PARAMS ((void)) ATTR_NORETURN;
/* Where to go for return_to_top_level (RETURN_ERROR). */
@@ -624,7 +636,7 @@ read_command_file (stream)
do_cleanups (cleanups);
}
-extern void init_proc ();
+extern void init_proc PARAMS ((void));
void (*pre_init_ui_hook) PARAMS ((void));
@@ -1160,7 +1172,9 @@ execute_command (p, from_tty)
register struct cmd_list_element *c;
register enum language flang;
static int warned = 0;
+ /* FIXME: These should really be in an appropriate header file */
extern FILE *serial_logfp;
+ extern void serial_log_command PARAMS ((const char *));
free_all_values ();
diff --git a/gdb/utils.c b/gdb/utils.c
index 9a6d249..37a6ec9 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -51,6 +51,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for local functions */
+static void vfprintf_maybe_filtered PARAMS ((FILE *, const char *, va_list, int));
+
+static void fputs_maybe_filtered PARAMS ((const char *, FILE *, int));
+
+#if !defined (NO_MMALLOC) && !defined (NO_MMCHECK)
+static void malloc_botch PARAMS ((void));
+#endif
+
static void
fatal_dump_core PARAMS((char *, ...));
@@ -217,7 +225,7 @@ free_current_contents (location)
/* ARGSUSED */
void
null_cleanup (arg)
- char **arg;
+ PTR arg;
{
}
@@ -1495,7 +1503,7 @@ fputc_unfiltered (c, stream)
static void
vfprintf_maybe_filtered (stream, format, args, filter)
FILE *stream;
- char *format;
+ const char *format;
va_list args;
int filter;
{
diff --git a/gdb/valops.c b/gdb/valops.c
index 684b224c..efcd9b3 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -62,6 +62,8 @@ static CORE_ADDR allocate_space_in_inferior PARAMS ((int));
static value_ptr cast_into_complex PARAMS ((struct type *, value_ptr));
+static value_ptr value_arg_coerce PARAMS ((value_ptr, struct type *));
+
#define VALUE_SUBSTRING_START(VAL) VALUE_FRAME(VAL)
/* Flag for whether we want to abandon failed expression evals by default. */
@@ -1031,7 +1033,7 @@ call_function_by_hand (function, nargs, args)
CORE_ADDR old_sp;
struct type *value_type;
unsigned char struct_return;
- CORE_ADDR struct_addr;
+ CORE_ADDR struct_addr = 0;
struct inferior_status inf_status;
struct cleanup *old_chain;
CORE_ADDR funaddr;
@@ -1698,6 +1700,7 @@ search_struct_method (name, arg1p, args, offset, static_memfuncp, type)
for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; i--)
{
char *t_field_name = TYPE_FN_FIELDLIST_NAME (type, i);
+ /* FIXME! May need to check for ARM demangling here */
if (strncmp(t_field_name, "__", 2)==0 ||
strncmp(t_field_name, "op", 2)==0 ||
strncmp(t_field_name, "type", 4)==0 )
@@ -2214,7 +2217,7 @@ value_slice (array, lowbound, length)
done with it. */
slice_range_type = create_range_type ((struct type*) NULL,
TYPE_TARGET_TYPE (range_type),
- lowerbound, lowerbound + length - 1);
+ lowbound, lowbound + length - 1);
if (TYPE_CODE (array_type) == TYPE_CODE_BITSTRING)
{
int i;
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 7b3cc57..c5d01b1 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "language.h"
#include "demangle.h"
#include "annotate.h"
+#include "valprint.h"
#include <errno.h>
@@ -244,15 +245,60 @@ print_longest (stream, format, use_local, val_long)
{
#if defined (CC_HAS_LONG_LONG) && !defined (PRINTF_HAS_LONG_LONG)
long vtop, vbot;
-
- vtop = val_long >> (sizeof (long) * HOST_CHAR_BIT);
+ unsigned int ui_max = UINT_MAX;
+ unsigned long long val_ulonglong;
+
+ /* Do shift in two operations so that if sizeof (long) == sizeof (LONGEST)
+ we can avoid warnings from picky compilers about shifts >= the size of
+ the shiftee in bits */
+ vtop = val_long >> (sizeof (long) * HOST_CHAR_BIT - 1);
+ vtop >>= 1;
vbot = (long) val_long;
-
- if ((format == 'd' && (val_long < INT_MIN || val_long > INT_MAX))
- || ((format == 'u' || format == 'x') && (unsigned long long)val_long > UINT_MAX))
+ val_ulonglong = (unsigned long long) val_long;
+ switch (format)
{
- fprintf_filtered (stream, "0x%lx%08lx", vtop, vbot);
- return;
+ case 'd':
+ if (val_long < INT_MIN || val_long > INT_MAX)
+ {
+ if (sizeof (long long) > sizeof (long))
+ {
+ fprintf_filtered (stream, "0x%lx%08lx", vtop, vbot);
+ }
+ else
+ {
+ fprintf_filtered (stream, "%d", vbot);
+ }
+ return;
+ }
+ break;
+ case 'x':
+ if (val_ulonglong > ui_max)
+ {
+ if (sizeof (long long) > sizeof (long))
+ {
+ fprintf_filtered (stream, "0x%lx%08lx", vtop, vbot);
+ }
+ else
+ {
+ fprintf_filtered (stream, "0x%lx", vbot);
+ }
+ return;
+ }
+ break;
+ case 'u':
+ if (val_ulonglong > ui_max)
+ {
+ if (sizeof (long long) > sizeof (long))
+ {
+ fprintf_filtered (stream, "0x%lx%08lx", vtop, vbot);
+ }
+ else
+ {
+ fprintf_filtered (stream, "%lu", (unsigned long) vbot);
+ }
+ return;
+ }
+ break;
}
#endif
@@ -361,8 +407,10 @@ longest_to_int (arg)
if (sizeof (LONGEST) <= sizeof (int))
return arg;
- if (arg > INT_MAX || arg < INT_MIN)
- error ("Value out of range.");
+ if (arg > INT_MAX)
+ error ("Value is larger than largest signed integer.");
+ if (arg < INT_MIN)
+ error ("Value is smaller than smallest signed integer.");
return arg;
}
@@ -464,7 +512,12 @@ print_floating (valaddr, type, stream)
else if (len == sizeof (double))
fprintf_filtered (stream, "%.17g", (double) doub);
else
+#ifdef PRINTF_HAS_LONG_DOUBLE
fprintf_filtered (stream, "%.35Lg", doub);
+#else
+ /* This at least wins with values that are representable as doubles */
+ fprintf_filtered (stream, "%.17g", (double) doub);
+#endif
}
/* VALADDR points to an integer of LEN bytes. Print it in hex on stream. */
diff --git a/gdb/valprint.h b/gdb/valprint.h
index c486dee..fb3e859 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -37,7 +37,8 @@ extern int stop_print_at_null; /* Stop printing at null char? */
extern void
val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
- int, int, int, enum val_prettyprint, int));
+ int, int, int, enum val_prettyprint,
+ unsigned int));
extern void
val_print_type_code_int PARAMS ((struct type *, char *, GDB_FILE *));
diff --git a/gdb/values.c b/gdb/values.c
index a3b6abd..954f620 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -41,6 +41,8 @@ static void show_values PARAMS ((char *, int));
static void show_convenience PARAMS ((char *, int));
+static int vb_match PARAMS ((struct type *, int, struct type *));
+
/* The value-history records all the values printed
by print commands during this session. Each chunk
records 60 consecutive values. The first chunk on
diff --git a/gdb/w65-tdep.c b/gdb/w65-tdep.c
index ebf8d95..e099f71 100644
--- a/gdb/w65-tdep.c
+++ b/gdb/w65-tdep.c
@@ -29,7 +29,7 @@
#include "gdbcmd.h"
#include "gdbtypes.h"
#include "dis-asm.h"
-
+#include "gdbcore.h"
/* Return the saved PC from this frame. */
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index dd11b33..81a8a06 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -51,6 +51,8 @@
/* Forward declaration */
extern struct target_ops child_ops;
+static void child_stop PARAMS ((void));
+
/* The most recently read context. Inspect ContextFlags to see what
bits are valid. */
@@ -765,7 +767,7 @@ child_mourn_inferior ()
/* Send a SIGINT to the process group. This acts just like the user typed a
^C on the controlling terminal. */
-void
+static void
child_stop ()
{
DEBUG_EVENTS (("gdb: GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)\n"));
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index ae5b7a1..5696056 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdbcmd.h"
#include "gdbtypes.h"
#include "dis-asm.h"
+#include "gdbcore.h"
/* Return the saved PC from this frame.