From 60250e8b18a4dee75e82d49da715681d41561b3b Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 12 Jan 2005 18:31:35 +0000 Subject: 2005-01-12 Andrew Cagney * exceptions.h (enum return_reason, RETURN_MASK) (RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL) (return_mask, throw_exception, catch_exceptions_ftype) (catch_exceptions_with_msg, catch_errors_ftype, catch_errors) (catch_command_errors_ftype, catch_command_errors): Move to exceptions.h. * exceptions.c, exceptions.h: New files. * top.c: Do not include . (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return) (throw_exception, catcher, catch_exceptions) (catch_exceptions_with_msg, struct catch_errors_args) (do_catch_errors, catch_errors, struct captured_command_args) (do_captured_command, catch_command_errors): Move to exceptions.c. * wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h". * tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto. * symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto. * remote-sds.c, remote-mips.c, remote-fileio.c: Ditto. * remote-e7000.c, objc-lang.c, ocd.c: Ditto. * remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto. * main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto. * hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto. * corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto. * ada-valprint.c, ada-lang.c: Ditto. * Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and exceptions.o. Update all dependencies. --- gdb/ChangeLog | 28 +++++ gdb/Makefile.in | 264 ++++++++++++++++++++++--------------------- gdb/ada-lang.c | 1 + gdb/ada-valprint.c | 1 + gdb/breakpoint.c | 1 + gdb/cli/cli-interp.c | 1 + gdb/corefile.c | 1 + gdb/corelow.c | 1 + gdb/defs.h | 91 +-------------- gdb/event-loop.c | 1 + gdb/event-top.c | 1 + gdb/exceptions.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++ gdb/exceptions.h | 114 +++++++++++++++++++ gdb/frame.c | 1 + gdb/hppa-hpux-tdep.c | 1 + gdb/inf-loop.c | 1 + gdb/infrun.c | 1 + gdb/m32r-rom.c | 1 + gdb/main.c | 1 + gdb/mi/mi-main.c | 1 + gdb/monitor.c | 1 + gdb/nto-procfs.c | 1 + gdb/objc-lang.c | 1 + gdb/ocd.c | 1 + gdb/remote-e7000.c | 1 + gdb/remote-fileio.c | 1 + gdb/remote-mips.c | 1 + gdb/remote-sds.c | 1 + gdb/remote.c | 1 + gdb/rs6000-nat.c | 1 + gdb/solib.c | 1 + gdb/stack.c | 1 + gdb/symfile-mem.c | 1 + gdb/symmisc.c | 1 + gdb/thread.c | 1 + gdb/top.c | 286 +--------------------------------------------- gdb/tui/tui-interp.c | 1 + gdb/utils.c | 1 + gdb/win32-nat.c | 1 + gdb/wince.c | 1 + gdb/windows-nat.c | 1 + gdb/wrapper.c | 1 + 42 files changed, 629 insertions(+), 503 deletions(-) create mode 100644 gdb/exceptions.c create mode 100644 gdb/exceptions.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c47f435d052..8fbf8d7ed25 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,31 @@ +2005-01-12 Andrew Cagney + + * exceptions.h (enum return_reason, RETURN_MASK) + (RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL) + (return_mask, throw_exception, catch_exceptions_ftype) + (catch_exceptions_with_msg, catch_errors_ftype, catch_errors) + (catch_command_errors_ftype, catch_command_errors): Move to + exceptions.h. + * exceptions.c, exceptions.h: New files. + * top.c: Do not include . + (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return) + (throw_exception, catcher, catch_exceptions) + (catch_exceptions_with_msg, struct catch_errors_args) + (do_catch_errors, catch_errors, struct captured_command_args) + (do_captured_command, catch_command_errors): Move to exceptions.c. + * wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h". + * tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto. + * symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto. + * remote-sds.c, remote-mips.c, remote-fileio.c: Ditto. + * remote-e7000.c, objc-lang.c, ocd.c: Ditto. + * remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto. + * main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto. + * hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto. + * corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto. + * ada-valprint.c, ada-lang.c: Ditto. + * Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and + exceptions.o. Update all dependencies. + 2005-01-11 Mark Kettenis * config/i386/nm-fbsd.h: Update copyright year. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 958a4dd0b9b..71ffbc5ae2c 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -667,6 +667,7 @@ dwarf2loc_h = dwarf2loc.h environ_h = environ.h event_loop_h = event-loop.h event_top_h = event-top.h +exceptions_h = exceptions.h exec_h = exec.h $(target_h) expression_h = expression.h $(symtab_h) $(doublest_h) fbsd_nat_h = fbsd-nat.h @@ -732,15 +733,15 @@ memattr_h = memattr.h mips_mdebug_tdep_h = mips-mdebug-tdep.h mipsnbsd_tdep_h = mipsnbsd-tdep.h mips_tdep_h = mips-tdep.h +mn10300_tdep_h = mn10300-tdep.h monitor_h = monitor.h nbsd_tdep_h = nbsd-tdep.h -ns32k_tdep_h = ns32k-tdep.h -nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) $(osabi_h) $(regset_h) objc_lang_h = objc-lang.h objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) ocd_h = ocd.h osabi_h = osabi.h -solib_pa64_h = solib-pa64.h +pa64solib_h = pa64solib.h parser_defs_h = parser-defs.h $(doublest_h) p_lang_h = p-lang.h ppcnbsd_tdep_h = ppcnbsd-tdep.h @@ -763,9 +764,11 @@ shnbsd_tdep_h = shnbsd-tdep.h sh_tdep_h = sh-tdep.h sim_regno_h = sim-regno.h solib_h = solib.h +solib_pa64_h = solib-pa64.h +solib_som_h = solib-som.h solib_svr4_h = solib-svr4.h solist_h = solist.h -solib_som_h = solib-som.h +somsolib_h = somsolib.h source_h = source.h sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) sparc_nat_h = sparc-nat.h @@ -844,6 +847,7 @@ tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) # right, it is probably easiest just to list .h files here directly. HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + exceptions.h \ environ.h $(gdbcmd_h) gdb.h gdbcore.h \ gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ objfiles.h parser-defs.h serial.h solib.h \ @@ -895,6 +899,7 @@ COMMON_OBS = $(DEPFILES) $(YYOBJ) \ infcall.o \ infcmd.o infrun.o \ expprint.o environ.o stack.o thread.o \ + exceptions.o \ inf-child.o \ interps.o \ main.o \ @@ -1627,14 +1632,15 @@ ada-lang.o: ada-lang.c $(defs_h) $(gdb_string_h) $(demangle_h) \ $(inferior_h) $(symfile_h) $(objfiles_h) $(breakpoint_h) \ $(gdbcore_h) $(hashtab_h) $(gdb_obstack_h) $(ada_lang_h) \ $(completer_h) $(gdb_stat_h) $(ui_out_h) $(block_h) $(infcall_h) \ - $(dictionary_h) + $(dictionary_h) $(exceptions_h) ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) ada-valprint.o: ada-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ $(gdbtypes_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ - $(language_h) $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) + $(language_h) $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) \ + $(exceptions_h) aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(ppc_tdep_h) \ $(gdb_string_h) @@ -1750,7 +1756,7 @@ breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) $(solist_h) \ - $(observer_h) $(gdb_events_h) + $(observer_h) $(exceptions_h) $(gdb_events_h) bsd-kvm.o: bsd-kvm.c $(defs_h) $(cli_cmds_h) $(command_h) $(frame_h) \ $(regcache_h) $(target_h) $(value_h) $(gdbcore_h) $(gdb_assert_h) \ $(readline_h) $(bsd_kvm_h) @@ -1789,11 +1795,12 @@ core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ $(gdb_dirent_h) $(gdb_stat_h) corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ - $(dis_asm_h) $(gdb_stat_h) $(completer_h) + $(dis_asm_h) $(gdb_stat_h) $(completer_h) $(exceptions_h) corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ - $(exec_h) $(readline_h) $(observer_h) $(gdb_assert_h) + $(exec_h) $(readline_h) $(observer_h) $(gdb_assert_h) \ + $(exceptions_h) core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ @@ -1880,10 +1887,11 @@ eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ $(parser_defs_h) event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ - $(gdb_string_h) + $(gdb_string_h) $(exceptions_h) event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ - $(gdbcmd_h) $(readline_h) $(readline_history_h) + $(exceptions_h) $(gdbcmd_h) $(readline_h) $(readline_history_h) +exceptions.o: exceptions.c exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ @@ -1913,7 +1921,7 @@ frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ - $(command_h) $(gdbcmd_h) $(observer_h) $(objfiles_h) + $(command_h) $(gdbcmd_h) $(observer_h) $(objfiles_h) $(exceptions_h) frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ $(gdb_assert_h) $(dummy_frame_h) $(gdb_obstack_h) frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(target_h) $(frame_h) \ @@ -1957,9 +1965,6 @@ go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ $(gdb_string_h) -h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ - $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ - $(gdb_assert_h) $(dis_asm_h) hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ @@ -1971,10 +1976,10 @@ hppa-hpux-nat.o: hppa-hpux-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ $(target_h) $(gdb_assert_h) $(hppa_tdep_h) $(inf_ptrace_h) \ $(inf_ttrace_h) hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ - $(osabi_h) $(gdb_string_h) $(frame_h) $(frame_unwind_h) \ - $(trad_frame_h) $(tramp_frame_h) $(symtab_h) $(objfiles_h) \ - $(inferior_h) $(infcall_h) $(observer_h) $(hppa_tdep_h) $(solib_som_h) \ - $(solib_pa64_h) $(regset_h) + $(osabi_h) $(frame_h) $(frame_unwind_h) $(trad_frame_h) $(symtab_h) \ + $(objfiles_h) $(inferior_h) $(infcall_h) $(observer_h) \ + $(hppa_tdep_h) $(solib_som_h) $(solib_pa64_h) $(regset_h) \ + $(exceptions_h) $(gdb_string_h) hppa-linux-nat.o: hppa-linux-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \ $(gdb_string_h) $(inferior_h) $(hppa_tdep_h) $(gregset_h) hppa-linux-tdep.o: hppa-linux-tdep.c $(defs_h) $(gdbcore_h) $(osabi_h) \ @@ -1989,9 +1994,10 @@ hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd_h) $(inferior_h) $(regcache_h) \ hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ - $(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h) + $(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h) hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ - $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) \ + $(hppa_tdep_h) i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ $(gdb_assert_h) $(i386_tdep_h) $(i387_tdep_h) $(i386bsd_nat_h) \ $(inf_ptrace_h) @@ -2023,9 +2029,9 @@ i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ $(gdbcore_h) $(regcache_h) $(regset_h) $(osabi_h) $(symtab_h) \ $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) \ $(nbsd_tdep_h) $(solib_svr4_h) -i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ - $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ - $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386-nto-tdep.o: i386-nto-tdep.c $(defs_h) $(frame_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nto_tdep_h) $(solib_svr4_h) i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ $(gdbcore_h) $(regcache_h) $(regset_h) $(symtab_h) $(objfiles_h) \ @@ -2059,8 +2065,8 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ - $(elf_bfd_h) $(dis_asm_h) $(infcall_h) $(ia64_tdep_h) $(elf_ia64_h) \ - $(libunwind_frame_h) $(libunwind_ia64_h) $(osabi_h) + $(elf_bfd_h) $(dis_asm_h) $(infcall_h) $(osabi_h) $(ia64_tdep_h) \ + $(elf_ia64_h) $(libunwind_frame_h) $(libunwind_ia64_h) infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) \ @@ -2074,27 +2080,27 @@ infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ $(gdb_assert_h) inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ - $(event_top_h) $(inf_loop_h) $(remote_h) + $(event_top_h) $(inf_loop_h) $(remote_h) $(exceptions_h) inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ $(inflow_h) inf-ptrace.o: inf-ptrace.c $(defs_h) $(command_h) $(inferior_h) $(inflow_h) \ $(gdbcore_h) $(observer_h) $(regcache_h) $(gdb_assert_h) \ $(gdb_string_h) $(gdb_ptrace_h) $(gdb_wait_h) $(inf_child_h) -inf-ttrace.o: inf-ttrace.c $(defs_h) $(command_h) $(gdbcore_h) \ - $(gdbthread_h) $(inferior_h) $(observer_h) $(target_h) \ - $(gdb_assert_h) $(gdb_string_h) $(inf_child_h) $(inf_ttrace_h) infptrace.o: infptrace.c $(defs_h) $(command_h) $(frame_h) $(gdbcore_h) \ $(inferior_h) $(regcache_h) $(target_h) $(gdb_assert_h) \ $(gdb_wait_h) $(gdb_string_h) $(gdb_dirent_h) $(gdb_ptrace_h) infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ - $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ - $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ - $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ - $(observer_h) $(language_h) $(gdb_assert_h) + $(inferior_h) $(exceptions_h) $(breakpoint_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(cli_script_h) $(target_h) $(gdbthread_h) \ + $(annotate_h) $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) \ + $(value_h) $(observer_h) $(language_h) $(gdb_assert_h) inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(observer_h) $(gdb_wait_h) \ $(inflow_h) +inf-ttrace.o: inf-ttrace.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(gdbthread_h) $(inferior_h) $(observer_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(inf_child_h) $(inf_ttrace_h) interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ $(gdb_events_h) $(gdb_assert_h) $(top_h) @@ -2131,6 +2137,10 @@ linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_string_h) \ $(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \ $(gdbcmd_h) $(regcache_h) $(elf_bfd_h) $(gregset_h) $(gdbcore_h) \ $(gdbthread_h) $(gdb_stat_h) +linux-thread-db.o: linux-thread-db.c $(defs_h) $(gdb_assert_h) \ + $(gdb_proc_service_h) $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) \ + $(inferior_h) $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) \ + $(solib_svr4_h) lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ $(gdbcore_h) $(regcache_h) m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ @@ -2148,11 +2158,12 @@ m32r-linux-nat.o: m32r-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ $(gregset_h) $(m32r_tdep_h) m32r-linux-tdep.o: m32r-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ - $(gdb_string_h) $(glibc_tdep_h) $(solib_svr4_h) $(trad_frame_h) \ - $(frame_unwind_h) $(regset_h) $(m32r_tdep_h) -m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ - $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ - $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) + $(regset_h) $(gdb_string_h) $(glibc_tdep_h) $(solib_svr4_h) \ + $(trad_frame_h) $(frame_unwind_h) $(m32r_tdep_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(exceptions_h) \ + $(monitor_h) $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) \ + $(symfile_h) $(gdb_string_h) $(objfiles_h) $(inferior_h) \ + $(regcache_h) m32r-stub.o: m32r-stub.c $(syscall_h) m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ @@ -2178,8 +2189,8 @@ m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ - $(m68k_tdep_h) $(trad_frame_h) $(frame_unwind_h) $(solib_svr4_h) \ - $(glibc_tdep_h) + $(m68k_tdep_h) $(trad_frame_h) $(frame_unwind_h) $(glibc_tdep_h) \ + $(solib_svr4_h) m68k-stub.o: m68k-stub.c m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ $(frame_base_h) $(frame_unwind_h) $(floatformat_h) $(symtab_h) \ @@ -2202,16 +2213,11 @@ macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ $(bcache_h) $(complaints_h) main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ - $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ - $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) + $(gdbcore_h) $(exceptions_h) $(getopt_h) $(gdb_stat_h) \ + $(gdb_string_h) $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) -mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ - $(gdb_string_h) $(regcache_h) $(serial_h) -mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ - $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ - $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ @@ -2262,23 +2268,16 @@ mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ $(gdbtypes_h) $(regcache_h) $(gdb_string_h) $(gdb_assert_h) \ $(frame_h) $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) \ - $(symtab_h) $(dwarf2_frame_h) $(regcache_h) -monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ - $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ - $(gdb_regex_h) $(srec_h) $(regcache_h) + $(symtab_h) $(dwarf2_frame_h) $(regcache_h) $(mn10300_tdep_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(exceptions_h) \ + $(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) \ + $(inferior_h) $(gdb_regex_h) $(srec_h) $(regcache_h) nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) -ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ - $(gdbcore_h) $(regcache_h) -ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ - $(gdb_string_h) -ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ - $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ - $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) -nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ - $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ - $(nto_tdep_h) $(command_h) $(regcache_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(exceptions_h) \ + $(gdb_string_h) $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) \ + $(gdbthread_h) $(nto_tdep_h) $(command_h) $(regcache_h) nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) @@ -2288,10 +2287,10 @@ objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ $(block_h) objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ - $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ - $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ - $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ - $(gdb_assert_h) + $(exceptions_h) $(complaints_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) \ + $(frame_h) $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) \ + $(valprint_h) $(gdb_assert_h) objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(mdebugread_h) \ $(gdb_assert_h) $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) \ @@ -2299,13 +2298,14 @@ objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \ $(observer_inc) ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ - $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ - $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) + $(bfd_h) $(symfile_h) $(target_h) $(exceptions_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) -solib-pa64.o: solib-pa64.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ - $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \ - $(solist_h) $(solib_pa64_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) $(hppa_tdep_h) parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ @@ -2374,25 +2374,27 @@ reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) regset.o: regset.c $(defs_h) $(regset_h) $(gdb_assert_h) remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ - $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ - $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ - $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ - $(gdbcore_h) $(remote_fileio_h) + $(symfile_h) $(exceptions_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(event_loop_h) $(event_top_h) $(inf_loop_h) \ + $(serial_h) $(gdbcore_h) $(remote_fileio_h) remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ - $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) + $(exceptions_h) $(gdbcmd_h) $(serial_h) $(remote_utils_h) \ + $(symfile_h) $(regcache_h) remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ $(serial_h) $(regcache_h) $(m68k_tdep_h) remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ - $(remote_fileio_h) + $(exceptions_h) $(remote_fileio_h) remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ $(serial_h) $(regcache_h) remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ - $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ - $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(exceptions_h) \ + $(remote_utils_h) $(gdb_string_h) $(gdb_stat_h) $(regcache_h) \ + $(mips_tdep_h) remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ @@ -2402,8 +2404,8 @@ remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ - $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ - $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(inferior_h) $(exceptions_h) $(bfd_h) $(symfile_h) $(target_h) \ + $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ $(regcache_h) $(serial_h) remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ @@ -2418,8 +2420,8 @@ rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ - $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(ppc_tdep_h) $(exec_h) \ - $(gdb_stat_h) + $(exceptions_h) $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ $(regcache_h) $(regset_h) $(doublest_h) $(value_h) $(parser_defs_h) \ @@ -2480,18 +2482,25 @@ solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ - $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ - $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ - $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(observer_h) \ - $(readline_h) + $(objfiles_h) $(exceptions_h) $(gdbcore_h) $(command_h) $(target_h) \ + $(frame_h) $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) \ + $(gdbcmd_h) $(completer_h) $(filenames_h) $(exec_h) $(solist_h) \ + $(observer_h) $(readline_h) solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \ $(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \ $(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h) solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-null.o: solib-null.c $(defs_h) $(solist_h) solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-pa64.o: solib-pa64.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \ + $(solist_h) $(solib_pa64_h) +solib-som.o: solib-som.c $(defs_h) $(som_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) \ + $(hppa_tdep_h) $(solist_h) solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ $(bcache_h) $(regcache_h) @@ -2506,9 +2515,10 @@ somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) \ $(solib_som_h) -solib-som.o: solib-som.c $(defs_h) $(som_h) $(symtab_h) $(bfd_h) $(symfile_h) \ - $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \ - $(solist_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) $(hppa_tdep_h) source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ @@ -2580,7 +2590,8 @@ stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ - $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) + $(gdb_assert_h) $(dictionary_h) $(exceptions_h) $(reggroups_h) \ + $(regcache_h) std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ $(value_h) $(gdb_string_h) stop-gdb.o: stop-gdb.c $(defs_h) @@ -2592,12 +2603,13 @@ symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ $(gdb_string_h) $(gdb_stat_h) symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \ - $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_h) \ - $(observer_h) $(auxv_h) $(elf_common_h) + $(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \ + $(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h) symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ - $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ - $(dictionary_h) $(gdb_string_h) $(readline_h) + $(gdb_obstack_h) $(exceptions_h) $(language_h) $(bcache_h) \ + $(block_h) $(gdb_regex_h) $(dictionary_h) $(gdb_string_h) \ + $(readline_h) symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ @@ -2609,19 +2621,17 @@ target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ - $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ - $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) -linux-thread-db.o: linux-thread-db.c $(defs_h) $(gdb_assert_h) \ - $(gdb_proc_service_h) $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) \ - $(inferior_h) $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) \ - $(solib_svr4_h) + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(exceptions_h) \ + $(command_h) $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) \ + $(ui_out_h) top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ - $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ - $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ - $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ - $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ - $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) + $(inferior_h) $(exceptions_h) $(target_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(language_h) $(terminal_h) \ + $(annotate_h) $(completer_h) $(top_h) $(version_h) $(serial_h) \ + $(doublest_h) $(gdb_assert_h) $(readline_h) $(readline_history_h) \ + $(event_top_h) $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) \ + $(cli_out_h) tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ @@ -2643,18 +2653,12 @@ ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ $(gdb_string_h) $(gdb_assert_h) $(frame_h) utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ - $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ - $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ - $(filenames_h) $(symfile_h) $(inferior_h) $(gdb_curses_h) \ - $(readline_h) + $(exceptions_h) $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) \ + $(target_h) $(demangle_h) $(expression_h) $(language_h) $(charset_h) \ + $(annotate_h) $(filenames_h) $(symfile_h) $(inferior_h) \ + $(gdb_curses_h) $(readline_h) uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ $(regcache_h) $(gregset_h) -v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ - $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ - $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) -v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ - $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ - $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ $(doublest_h) $(infcall_h) @@ -2683,15 +2687,16 @@ vax-tdep.o: vax-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) $(frame_h) \ $(osabi_h) $(regcache_h) $(regset_h) $(trad_frame_h) $(value_h) \ $(gdb_string_h) $(vax_tdep_h) win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ - $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ - $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ - $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) -wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ - $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ - $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ - $(regcache_h) $(mips_tdep_h) + $(exceptions_h) $(gdbcore_h) $(command_h) $(completer_h) \ + $(regcache_h) $(top_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) \ + $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(exceptions_h) $(gdbcore_h) $(command_h) $(buildsym_h) $(symfile_h) \ + $(objfiles_h) $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) \ + $(wince_stub_h) $(regcache_h) $(mips_tdep_h) wince-stub.o: wince-stub.c $(wince_stub_h) -wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(exceptions_h) $(wrapper_h) xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ @@ -2728,7 +2733,8 @@ cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ - $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) \ + $(exceptions_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ $(gdb_string_h) @@ -2936,10 +2942,10 @@ mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ - $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ - $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ - $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ - $(gdb_h) $(frame_h) $(mi_main_h) + $(gdb_string_h) $(exceptions_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) \ + $(mi_parse_h) $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \ + $(interps_h) $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) \ + $(regcache_h) $(gdb_h) $(frame_h) $(mi_main_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c96a0bf28b6..18776230d0e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -50,6 +50,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "block.h" #include "infcall.h" #include "dictionary.h" +#include "exceptions.h" #ifndef ADA_RETAIN_DOTS #define ADA_RETAIN_DOTS 0 diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index da9a6bab3b3..481bc703b80 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -33,6 +33,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "ada-lang.h" #include "c-lang.h" #include "infcall.h" +#include "exceptions.h" /* Encapsulates arguments to ada_val_print. */ struct ada_val_print_args diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 20134e579d0..77eae5542cf 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -51,6 +51,7 @@ #include "block.h" #include "solist.h" #include "observer.h" +#include "exceptions.h" #include "gdb-events.h" diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 6abb24ddffe..35b76229dc3 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -27,6 +27,7 @@ #include "cli-out.h" #include "top.h" /* for "execute_command" */ #include "gdb_string.h" +#include "exceptions.h" struct ui_out *cli_uiout; diff --git a/gdb/corefile.c b/gdb/corefile.c index 91519b97f63..d4bb3e0cc9b 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -35,6 +35,7 @@ #include "dis-asm.h" #include "gdb_stat.h" #include "completer.h" +#include "exceptions.h" /* Local function declarations. */ diff --git a/gdb/corelow.c b/gdb/corelow.c index c130cf8b4c3..9e052c5fab8 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -45,6 +45,7 @@ #include "readline/readline.h" #include "observer.h" #include "gdb_assert.h" +#include "exceptions.h" #ifndef O_BINARY #define O_BINARY 0 diff --git a/gdb/defs.h b/gdb/defs.h index 617af3e8f70..f6efab874d8 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -332,6 +332,8 @@ extern char *safe_strerror (int); extern void request_quit (int); +#define ALL_CLEANUPS ((struct cleanup *)0) + extern void do_cleanups (struct cleanup *); extern void do_final_cleanups (struct cleanup *); extern void do_run_cleanups (struct cleanup *); @@ -921,95 +923,6 @@ extern void internal_warning (const char *file, int line, extern NORETURN void nomem (long) ATTR_NORETURN; -/* Reasons for calling throw_exception(). NOTE: all reason values - must be less than zero. enum value 0 is reserved for internal use - as the return value from an initial setjmp(). The function - catch_exceptions() reserves values >= 0 as legal results from its - wrapped function. */ - -enum return_reason - { - /* User interrupt. */ - RETURN_QUIT = -2, - /* Any other error. */ - RETURN_ERROR - }; - -#define ALL_CLEANUPS ((struct cleanup *)0) - -#define RETURN_MASK(reason) (1 << (int)(-reason)) -#define RETURN_MASK_QUIT RETURN_MASK (RETURN_QUIT) -#define RETURN_MASK_ERROR RETURN_MASK (RETURN_ERROR) -#define RETURN_MASK_ALL (RETURN_MASK_QUIT | RETURN_MASK_ERROR) -typedef int return_mask; - -/* Throw an exception of type RETURN_REASON. Will execute a LONG JUMP - to the inner most containing exception handler established using - catch_exceptions() (or the legacy catch_errors()). - - Code normally throws an exception using error() et.al. For various - reaons, GDB also contains code that throws an exception directly. - For instance, the remote*.c targets contain CNTRL-C signal handlers - that propogate the QUIT event up the exception chain. ``This could - be a good thing or a dangerous thing.'' -- the Existential Wombat. */ - -extern NORETURN void throw_exception (enum return_reason) ATTR_NORETURN; - -/* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception - handler. If an exception (enum return_reason) is thrown using - throw_exception() than all cleanups installed since - catch_exceptions() was entered are invoked, the (-ve) exception - value is then returned by catch_exceptions. If FUNC() returns - normally (with a postive or zero return value) then that value is - returned by catch_exceptions(). It is an internal_error() for - FUNC() to return a negative value. - - For the period of the FUNC() call: UIOUT is installed as the output - builder; ERRSTRING is installed as the error/quit message; and a - new cleanup_chain is established. The old values are restored - before catch_exceptions() returns. - - The variant catch_exceptions_with_msg() is the same as - catch_exceptions() but adds the ability to return an allocated - copy of the gdb error message. This is used when a silent error is - issued and the caller wants to manually issue the error message. - - FIXME; cagney/2001-08-13: The need to override the global UIOUT - builder variable should just go away. - - This function superseeds catch_errors(). - - This function uses SETJMP() and LONGJUMP(). */ - -struct ui_out; -typedef int (catch_exceptions_ftype) (struct ui_out *ui_out, void *args); -extern int catch_exceptions (struct ui_out *uiout, - catch_exceptions_ftype *func, void *func_args, - char *errstring, return_mask mask); -extern int catch_exceptions_with_msg (struct ui_out *uiout, - catch_exceptions_ftype *func, - void *func_args, - char *errstring, char **gdberrmsg, - return_mask mask); - -/* If CATCH_ERRORS_FTYPE throws an error, catch_errors() returns zero - otherwize the result from CATCH_ERRORS_FTYPE is returned. It is - probably useful for CATCH_ERRORS_FTYPE to always return a non-zero - value. It's unfortunate that, catch_errors() does not return an - indication of the exact exception that it caught - quit_flag might - help. - - This function is superseeded by catch_exceptions(). */ - -typedef int (catch_errors_ftype) (void *); -extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask); - -/* Template to catch_errors() that wraps calls to command - functions. */ - -typedef void (catch_command_errors_ftype) (char *, int); -extern int catch_command_errors (catch_command_errors_ftype *func, char *command, int from_tty, return_mask); - extern void warning (const char *, ...) ATTR_FORMAT (printf, 1, 2); extern void vwarning (const char *, va_list args); diff --git a/gdb/event-loop.c b/gdb/event-loop.c index c8d12f925df..5f3d30e87ec 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -35,6 +35,7 @@ #include "gdb_string.h" #include #include +#include "exceptions.h" typedef struct gdb_event gdb_event; typedef void (event_handler_func) (int); diff --git a/gdb/event-top.c b/gdb/event-top.c index 39d52fe5f58..5f7df47ed87 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -28,6 +28,7 @@ #include "event-top.h" #include "interps.h" #include +#include "exceptions.h" /* For dont_repeat() */ #include "gdbcmd.h" diff --git a/gdb/exceptions.c b/gdb/exceptions.c new file mode 100644 index 00000000000..bf56eb24709 --- /dev/null +++ b/gdb/exceptions.c @@ -0,0 +1,313 @@ +/* Exception (throw catch) mechanism, for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "exceptions.h" +#include +#include "breakpoint.h" +#include "target.h" +#include "inferior.h" +#include "annotate.h" +#include "ui-out.h" +#include "gdb_assert.h" + +/* One should use catch_errors rather than manipulating these + directly. */ +#if defined(HAVE_SIGSETJMP) +#define SIGJMP_BUF sigjmp_buf +#define SIGSETJMP(buf) sigsetjmp((buf), 1) +#define SIGLONGJMP(buf,val) siglongjmp((buf), (val)) +#else +#define SIGJMP_BUF jmp_buf +#define SIGSETJMP(buf) setjmp(buf) +#define SIGLONGJMP(buf,val) longjmp((buf), (val)) +#endif + +/* Where to go for throw_exception(). */ +static SIGJMP_BUF *catch_return; + +/* Return for reason REASON to the nearest containing catch_errors(). */ + +NORETURN void +throw_exception (enum return_reason reason) +{ + quit_flag = 0; + immediate_quit = 0; + + /* Perhaps it would be cleaner to do this via the cleanup chain (not sure + I can think of a reason why that is vital, though). */ + bpstat_clear_actions (stop_bpstat); /* Clear queued breakpoint commands */ + + disable_current_display (); + do_cleanups (ALL_CLEANUPS); + if (target_can_async_p () && !target_executing) + do_exec_cleanups (ALL_CLEANUPS); + if (sync_execution) + do_exec_error_cleanups (ALL_CLEANUPS); + + if (annotation_level > 1) + switch (reason) + { + case RETURN_QUIT: + annotate_quit (); + break; + case RETURN_ERROR: + annotate_error (); + break; + } + + /* Jump to the containing catch_errors() call, communicating REASON + to that call via setjmp's return value. Note that REASON can't + be zero, by definition in defs.h. */ + + (NORETURN void) SIGLONGJMP (*catch_return, (int) reason); +} + +/* Call FUNC() with args FUNC_UIOUT and FUNC_ARGS, catching any + errors. Set FUNC_CAUGHT to an ``enum return_reason'' if the + function is aborted (using throw_exception() or zero if the + function returns normally. Set FUNC_VAL to the value returned by + the function or 0 if the function was aborted. + + Must not be called with immediate_quit in effect (bad things might + happen, say we got a signal in the middle of a memcpy to quit_return). + This is an OK restriction; with very few exceptions immediate_quit can + be replaced by judicious use of QUIT. + + MASK specifies what to catch; it is normally set to + RETURN_MASK_ALL, if for no other reason than that the code which + calls catch_errors might not be set up to deal with a quit which + isn't caught. But if the code can deal with it, it generally + should be RETURN_MASK_ERROR, unless for some reason it is more + useful to abort only the portion of the operation inside the + catch_errors. Note that quit should return to the command line + fairly quickly, even if some further processing is being done. */ + +/* MAYBE: cagney/1999-11-05: catch_errors() in conjunction with + error() et.al. could maintain a set of flags that indicate the the + current state of each of the longjmp buffers. This would give the + longjmp code the chance to detect a longjmp botch (before it gets + to longjmperror()). Prior to 1999-11-05 this wasn't possible as + code also randomly used a SET_TOP_LEVEL macro that directly + initialize the longjmp buffers. */ + +/* MAYBE: cagney/1999-11-05: Should the catch_errors and cleanups code + be consolidated into a single file instead of being distributed + between utils.c and top.c? */ + +static void +catcher (catch_exceptions_ftype *func, + struct ui_out *func_uiout, + void *func_args, + int *func_val, + enum return_reason *func_caught, + char *errstring, + char **gdberrmsg, + return_mask mask) +{ + SIGJMP_BUF *saved_catch; + SIGJMP_BUF catch; + struct cleanup *saved_cleanup_chain; + char *saved_error_pre_print; + char *saved_quit_pre_print; + struct ui_out *saved_uiout; + + /* Return value from SIGSETJMP(): enum return_reason if error or + quit caught, 0 otherwise. */ + int caught; + + /* Return value from FUNC(): Hopefully non-zero. Explicitly set to + zero if an error quit was caught. */ + int val; + + /* Override error/quit messages during FUNC. */ + + saved_error_pre_print = error_pre_print; + saved_quit_pre_print = quit_pre_print; + + if (mask & RETURN_MASK_ERROR) + error_pre_print = errstring; + if (mask & RETURN_MASK_QUIT) + quit_pre_print = errstring; + + /* Override the global ``struct ui_out'' builder. */ + + saved_uiout = uiout; + uiout = func_uiout; + + /* Prevent error/quit during FUNC from calling cleanups established + prior to here. */ + + saved_cleanup_chain = save_cleanups (); + + /* Call FUNC, catching error/quit events. */ + + saved_catch = catch_return; + catch_return = &catch; + caught = SIGSETJMP (catch); + if (!caught) + val = (*func) (func_uiout, func_args); + else + { + val = 0; + /* If caller wants a copy of the low-level error message, make one. + This is used in the case of a silent error whereby the caller + may optionally want to issue the message. */ + if (gdberrmsg) + *gdberrmsg = error_last_message (); + } + catch_return = saved_catch; + + /* FIXME: cagney/1999-11-05: A correct FUNC implementation will + clean things up (restoring the cleanup chain) to the state they + were just prior to the call. Unfortunately, many FUNC's are not + that well behaved. This could be fixed by adding either a + do_cleanups call (to cover the problem) or an assertion check to + detect bad FUNCs code. */ + + /* Restore the cleanup chain, the error/quit messages, and the uiout + builder, to their original states. */ + + restore_cleanups (saved_cleanup_chain); + + uiout = saved_uiout; + + if (mask & RETURN_MASK_QUIT) + quit_pre_print = saved_quit_pre_print; + if (mask & RETURN_MASK_ERROR) + error_pre_print = saved_error_pre_print; + + /* Return normally if no error/quit event occurred or this catcher + can handle this exception. The caller analyses the func return + values. */ + + if (!caught || (mask & RETURN_MASK (caught))) + { + *func_val = val; + *func_caught = caught; + return; + } + + /* The caller didn't request that the event be caught, relay the + event to the next containing catch_errors(). */ + + throw_exception (caught); +} + +int +catch_exceptions (struct ui_out *uiout, + catch_exceptions_ftype *func, + void *func_args, + char *errstring, + return_mask mask) +{ + int val; + enum return_reason caught; + catcher (func, uiout, func_args, &val, &caught, errstring, NULL, mask); + gdb_assert (val >= 0); + gdb_assert (caught <= 0); + if (caught < 0) + return caught; + return val; +} + +int +catch_exceptions_with_msg (struct ui_out *uiout, + catch_exceptions_ftype *func, + void *func_args, + char *errstring, + char **gdberrmsg, + return_mask mask) +{ + int val; + enum return_reason caught; + catcher (func, uiout, func_args, &val, &caught, errstring, gdberrmsg, mask); + gdb_assert (val >= 0); + gdb_assert (caught <= 0); + if (caught < 0) + return caught; + return val; +} + +struct catch_errors_args +{ + catch_errors_ftype *func; + void *func_args; +}; + +static int +do_catch_errors (struct ui_out *uiout, void *data) +{ + struct catch_errors_args *args = data; + return args->func (args->func_args); +} + +int +catch_errors (catch_errors_ftype *func, void *func_args, char *errstring, + return_mask mask) +{ + int val; + enum return_reason caught; + struct catch_errors_args args; + args.func = func; + args.func_args = func_args; + catcher (do_catch_errors, uiout, &args, &val, &caught, errstring, + NULL, mask); + if (caught != 0) + return 0; + return val; +} + +struct captured_command_args + { + catch_command_errors_ftype *command; + char *arg; + int from_tty; + }; + +static int +do_captured_command (void *data) +{ + struct captured_command_args *context = data; + context->command (context->arg, context->from_tty); + /* FIXME: cagney/1999-11-07: Technically this do_cleanups() call + isn't needed. Instead an assertion check could be made that + simply confirmed that the called function correctly cleaned up + after itself. Unfortunately, old code (prior to 1999-11-04) in + main.c was calling SET_TOP_LEVEL(), calling the command function, + and then *always* calling do_cleanups(). For the moment we + remain ``bug compatible'' with that old code.. */ + do_cleanups (ALL_CLEANUPS); + return 1; +} + +int +catch_command_errors (catch_command_errors_ftype * command, + char *arg, int from_tty, return_mask mask) +{ + struct captured_command_args args; + args.command = command; + args.arg = arg; + args.from_tty = from_tty; + return catch_errors (do_captured_command, &args, "", mask); +} diff --git a/gdb/exceptions.h b/gdb/exceptions.h new file mode 100644 index 00000000000..5ebde662794 --- /dev/null +++ b/gdb/exceptions.h @@ -0,0 +1,114 @@ +/* Exception (throw catch) mechanism, for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef EXCEPTIONS_H +#define EXCEPTIONS_H + +/* Reasons for calling throw_exception(). NOTE: all reason values + must be less than zero. enum value 0 is reserved for internal use + as the return value from an initial setjmp(). The function + catch_exceptions() reserves values >= 0 as legal results from its + wrapped function. */ + +enum return_reason + { + /* User interrupt. */ + RETURN_QUIT = -2, + /* Any other error. */ + RETURN_ERROR + }; + +#define RETURN_MASK(reason) (1 << (int)(-reason)) +#define RETURN_MASK_QUIT RETURN_MASK (RETURN_QUIT) +#define RETURN_MASK_ERROR RETURN_MASK (RETURN_ERROR) +#define RETURN_MASK_ALL (RETURN_MASK_QUIT | RETURN_MASK_ERROR) +typedef int return_mask; + +/* Throw an exception of type RETURN_REASON. Will execute a LONG JUMP + to the inner most containing exception handler established using + catch_exceptions() (or the legacy catch_errors()). + + Code normally throws an exception using error() et.al. For various + reaons, GDB also contains code that throws an exception directly. + For instance, the remote*.c targets contain CNTRL-C signal handlers + that propogate the QUIT event up the exception chain. ``This could + be a good thing or a dangerous thing.'' -- the Existential Wombat. */ + +extern NORETURN void throw_exception (enum return_reason) ATTR_NORETURN; + +/* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception + handler. If an exception (enum return_reason) is thrown using + throw_exception() than all cleanups installed since + catch_exceptions() was entered are invoked, the (-ve) exception + value is then returned by catch_exceptions. If FUNC() returns + normally (with a postive or zero return value) then that value is + returned by catch_exceptions(). It is an internal_error() for + FUNC() to return a negative value. + + For the period of the FUNC() call: UIOUT is installed as the output + builder; ERRSTRING is installed as the error/quit message; and a + new cleanup_chain is established. The old values are restored + before catch_exceptions() returns. + + The variant catch_exceptions_with_msg() is the same as + catch_exceptions() but adds the ability to return an allocated + copy of the gdb error message. This is used when a silent error is + issued and the caller wants to manually issue the error message. + + FIXME; cagney/2001-08-13: The need to override the global UIOUT + builder variable should just go away. + + This function superseeds catch_errors(). + + This function uses SETJMP() and LONGJUMP(). */ + +struct ui_out; +typedef int (catch_exceptions_ftype) (struct ui_out *ui_out, void *args); +extern int catch_exceptions (struct ui_out *uiout, + catch_exceptions_ftype *func, void *func_args, + char *errstring, return_mask mask); +extern int catch_exceptions_with_msg (struct ui_out *uiout, + catch_exceptions_ftype *func, + void *func_args, + char *errstring, char **gdberrmsg, + return_mask mask); + +/* If CATCH_ERRORS_FTYPE throws an error, catch_errors() returns zero + otherwize the result from CATCH_ERRORS_FTYPE is returned. It is + probably useful for CATCH_ERRORS_FTYPE to always return a non-zero + value. It's unfortunate that, catch_errors() does not return an + indication of the exact exception that it caught - quit_flag might + help. + + This function is superseeded by catch_exceptions(). */ + +typedef int (catch_errors_ftype) (void *); +extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask); + +/* Template to catch_errors() that wraps calls to command + functions. */ + +typedef void (catch_command_errors_ftype) (char *, int); +extern int catch_command_errors (catch_command_errors_ftype *func, char *command, int from_tty, return_mask); + +#endif diff --git a/gdb/frame.c b/gdb/frame.c index 99ad24d1efa..13a9f1d2734 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -41,6 +41,7 @@ #include "gdbcmd.h" #include "observer.h" #include "objfiles.h" +#include "exceptions.h" static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame); diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index f426c178b82..78d2d3c64e5 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -35,6 +35,7 @@ #include "solib-som.h" #include "solib-pa64.h" #include "regset.h" +#include "exceptions.h" #include "gdb_string.h" diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c index ed60cc32301..b738cfc4ccd 100644 --- a/gdb/inf-loop.c +++ b/gdb/inf-loop.c @@ -26,6 +26,7 @@ #include "event-top.h" #include "inf-loop.h" #include "remote.h" +#include "exceptions.h" static int fetch_inferior_event_wrapper (gdb_client_data client_data); static void complete_execution (void); diff --git a/gdb/infrun.c b/gdb/infrun.c index a425b6708e4..d68ab16dfc5 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -28,6 +28,7 @@ #include "symtab.h" #include "frame.h" #include "inferior.h" +#include "exceptions.h" #include "breakpoint.h" #include "gdb_wait.h" #include "gdbcore.h" diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index 403d7535a44..3361c3c51a4 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -28,6 +28,7 @@ #include "defs.h" #include "gdbcore.h" #include "target.h" +#include "exceptions.h" #include "monitor.h" #include "serial.h" #include "symtab.h" diff --git a/gdb/main.c b/gdb/main.c index 5e8b2acbbb6..f41410afb41 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -28,6 +28,7 @@ #include "symfile.h" #include "gdbcore.h" +#include "exceptions.h" #include "getopt.h" #include diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index e7c5701b869..a593ed47ce5 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -28,6 +28,7 @@ #include "target.h" #include "inferior.h" #include "gdb_string.h" +#include "exceptions.h" #include "top.h" #include "gdbthread.h" #include "mi-cmds.h" diff --git a/gdb/monitor.c b/gdb/monitor.c index 5e50713ed83..8bb3bb9b891 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -43,6 +43,7 @@ #include "defs.h" #include "gdbcore.h" #include "target.h" +#include "exceptions.h" #include #include #include "gdb_string.h" diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 0b13d352ba0..cf01d2fec82 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -33,6 +33,7 @@ #include "gdb_dirent.h" #include +#include "exceptions.h" #include "gdb_string.h" #include "gdbcore.h" #include "inferior.h" diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 92523124a6b..f0d3b784a43 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -30,6 +30,7 @@ #include "language.h" #include "c-lang.h" #include "objc-lang.h" +#include "exceptions.h" #include "complaints.h" #include "value.h" #include "symfile.h" diff --git a/gdb/ocd.c b/gdb/ocd.c index 320f06a7f8b..a0179090e8e 100644 --- a/gdb/ocd.c +++ b/gdb/ocd.c @@ -29,6 +29,7 @@ #include "bfd.h" #include "symfile.h" #include "target.h" +#include "exceptions.h" #include "gdbcmd.h" #include "objfiles.h" #include "gdb-stabs.h" diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index e223c2cbdc4..06b73f56925 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -43,6 +43,7 @@ #include "value.h" #include "command.h" #include "gdb_string.h" +#include "exceptions.h" #include "gdbcmd.h" #include #include "serial.h" diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 281872ec6c0..3d35f5628ad 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -28,6 +28,7 @@ #include "gdb/fileio.h" #include "gdb_wait.h" #include "gdb_stat.h" +#include "exceptions.h" #include "remote-fileio.h" #include diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 971da6d5dda..29aea1cfbe2 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -31,6 +31,7 @@ #include "gdbcore.h" #include "serial.h" #include "target.h" +#include "exceptions.h" #include "remote-utils.h" #include "gdb_string.h" #include "gdb_stat.h" diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c index 0bf1c01c82a..3ad9c108bea 100644 --- a/gdb/remote-sds.c +++ b/gdb/remote-sds.c @@ -30,6 +30,7 @@ #include #include "frame.h" #include "inferior.h" +#include "exceptions.h" #include "bfd.h" #include "symfile.h" #include "target.h" diff --git a/gdb/remote.c b/gdb/remote.c index 2ab1c2f467f..1a6f8b55b7f 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -30,6 +30,7 @@ #include "inferior.h" #include "bfd.h" #include "symfile.h" +#include "exceptions.h" #include "target.h" /*#include "terminal.h" */ #include "gdbcmd.h" diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index df360763f42..29ef8ac2ca2 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -30,6 +30,7 @@ #include "objfiles.h" #include "libbfd.h" /* For bfd_default_set_arch_mach (FIXME) */ #include "bfd.h" +#include "exceptions.h" #include "gdb-stabs.h" #include "regcache.h" #include "arch-utils.h" diff --git a/gdb/solib.c b/gdb/solib.c index 35480bfbbb9..df59835b756 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -29,6 +29,7 @@ #include "bfd.h" #include "symfile.h" #include "objfiles.h" +#include "exceptions.h" #include "gdbcore.h" #include "command.h" #include "target.h" diff --git a/gdb/stack.c b/gdb/stack.c index 06a59cb01f4..d37294dba1d 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -43,6 +43,7 @@ #include "stack.h" #include "gdb_assert.h" #include "dictionary.h" +#include "exceptions.h" #include "reggroups.h" #include "regcache.h" diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 29ef92688e0..7a4549f1eea 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -48,6 +48,7 @@ #include "symtab.h" #include "gdbcore.h" #include "objfiles.h" +#include "exceptions.h" #include "gdbcmd.h" #include "target.h" #include "value.h" diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 45e2a44ecd7..d3fb7ba53a6 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -30,6 +30,7 @@ #include "breakpoint.h" #include "command.h" #include "gdb_obstack.h" +#include "exceptions.h" #include "language.h" #include "bcache.h" #include "block.h" diff --git a/gdb/thread.c b/gdb/thread.c index c77585e3fc0..8a749011ac1 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -30,6 +30,7 @@ #include "value.h" #include "target.h" #include "gdbthread.h" +#include "exceptions.h" #include "command.h" #include "gdbcmd.h" #include "regcache.h" diff --git a/gdb/top.c b/gdb/top.c index 618dc86ecb2..b4475214d42 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -30,6 +30,7 @@ #include "cli/cli-decode.h" #include "symtab.h" #include "inferior.h" +#include "exceptions.h" #include #include "target.h" #include "breakpoint.h" @@ -55,8 +56,6 @@ #include -#include - #include "event-top.h" #include "gdb_string.h" #include "gdb_stat.h" @@ -291,289 +290,6 @@ void (*deprecated_context_hook) (int id); middle of the GUI. Usually used in conjunction with a catch routine. */ void (*deprecated_error_hook) (void); - - -/* One should use catch_errors rather than manipulating these - directly. */ -#if defined(HAVE_SIGSETJMP) -#define SIGJMP_BUF sigjmp_buf -#define SIGSETJMP(buf) sigsetjmp((buf), 1) -#define SIGLONGJMP(buf,val) siglongjmp((buf), (val)) -#else -#define SIGJMP_BUF jmp_buf -#define SIGSETJMP(buf) setjmp(buf) -#define SIGLONGJMP(buf,val) longjmp((buf), (val)) -#endif - -/* Where to go for throw_exception(). */ -static SIGJMP_BUF *catch_return; - -/* Return for reason REASON to the nearest containing catch_errors(). */ - -NORETURN void -throw_exception (enum return_reason reason) -{ - quit_flag = 0; - immediate_quit = 0; - - /* Perhaps it would be cleaner to do this via the cleanup chain (not sure - I can think of a reason why that is vital, though). */ - bpstat_clear_actions (stop_bpstat); /* Clear queued breakpoint commands */ - - disable_current_display (); - do_cleanups (ALL_CLEANUPS); - if (target_can_async_p () && !target_executing) - do_exec_cleanups (ALL_CLEANUPS); - if (sync_execution) - do_exec_error_cleanups (ALL_CLEANUPS); - - if (annotation_level > 1) - switch (reason) - { - case RETURN_QUIT: - annotate_quit (); - break; - case RETURN_ERROR: - annotate_error (); - break; - } - - /* Jump to the containing catch_errors() call, communicating REASON - to that call via setjmp's return value. Note that REASON can't - be zero, by definition in defs.h. */ - - (NORETURN void) SIGLONGJMP (*catch_return, (int) reason); -} - -/* Call FUNC() with args FUNC_UIOUT and FUNC_ARGS, catching any - errors. Set FUNC_CAUGHT to an ``enum return_reason'' if the - function is aborted (using throw_exception() or zero if the - function returns normally. Set FUNC_VAL to the value returned by - the function or 0 if the function was aborted. - - Must not be called with immediate_quit in effect (bad things might - happen, say we got a signal in the middle of a memcpy to quit_return). - This is an OK restriction; with very few exceptions immediate_quit can - be replaced by judicious use of QUIT. - - MASK specifies what to catch; it is normally set to - RETURN_MASK_ALL, if for no other reason than that the code which - calls catch_errors might not be set up to deal with a quit which - isn't caught. But if the code can deal with it, it generally - should be RETURN_MASK_ERROR, unless for some reason it is more - useful to abort only the portion of the operation inside the - catch_errors. Note that quit should return to the command line - fairly quickly, even if some further processing is being done. */ - -/* MAYBE: cagney/1999-11-05: catch_errors() in conjunction with - error() et.al. could maintain a set of flags that indicate the the - current state of each of the longjmp buffers. This would give the - longjmp code the chance to detect a longjmp botch (before it gets - to longjmperror()). Prior to 1999-11-05 this wasn't possible as - code also randomly used a SET_TOP_LEVEL macro that directly - initialize the longjmp buffers. */ - -/* MAYBE: cagney/1999-11-05: Should the catch_errors and cleanups code - be consolidated into a single file instead of being distributed - between utils.c and top.c? */ - -static void -catcher (catch_exceptions_ftype *func, - struct ui_out *func_uiout, - void *func_args, - int *func_val, - enum return_reason *func_caught, - char *errstring, - char **gdberrmsg, - return_mask mask) -{ - SIGJMP_BUF *saved_catch; - SIGJMP_BUF catch; - struct cleanup *saved_cleanup_chain; - char *saved_error_pre_print; - char *saved_quit_pre_print; - struct ui_out *saved_uiout; - - /* Return value from SIGSETJMP(): enum return_reason if error or - quit caught, 0 otherwise. */ - int caught; - - /* Return value from FUNC(): Hopefully non-zero. Explicitly set to - zero if an error quit was caught. */ - int val; - - /* Override error/quit messages during FUNC. */ - - saved_error_pre_print = error_pre_print; - saved_quit_pre_print = quit_pre_print; - - if (mask & RETURN_MASK_ERROR) - error_pre_print = errstring; - if (mask & RETURN_MASK_QUIT) - quit_pre_print = errstring; - - /* Override the global ``struct ui_out'' builder. */ - - saved_uiout = uiout; - uiout = func_uiout; - - /* Prevent error/quit during FUNC from calling cleanups established - prior to here. */ - - saved_cleanup_chain = save_cleanups (); - - /* Call FUNC, catching error/quit events. */ - - saved_catch = catch_return; - catch_return = &catch; - caught = SIGSETJMP (catch); - if (!caught) - val = (*func) (func_uiout, func_args); - else - { - val = 0; - /* If caller wants a copy of the low-level error message, make one. - This is used in the case of a silent error whereby the caller - may optionally want to issue the message. */ - if (gdberrmsg) - *gdberrmsg = error_last_message (); - } - catch_return = saved_catch; - - /* FIXME: cagney/1999-11-05: A correct FUNC implementation will - clean things up (restoring the cleanup chain) to the state they - were just prior to the call. Unfortunately, many FUNC's are not - that well behaved. This could be fixed by adding either a - do_cleanups call (to cover the problem) or an assertion check to - detect bad FUNCs code. */ - - /* Restore the cleanup chain, the error/quit messages, and the uiout - builder, to their original states. */ - - restore_cleanups (saved_cleanup_chain); - - uiout = saved_uiout; - - if (mask & RETURN_MASK_QUIT) - quit_pre_print = saved_quit_pre_print; - if (mask & RETURN_MASK_ERROR) - error_pre_print = saved_error_pre_print; - - /* Return normally if no error/quit event occurred or this catcher - can handle this exception. The caller analyses the func return - values. */ - - if (!caught || (mask & RETURN_MASK (caught))) - { - *func_val = val; - *func_caught = caught; - return; - } - - /* The caller didn't request that the event be caught, relay the - event to the next containing catch_errors(). */ - - throw_exception (caught); -} - -int -catch_exceptions (struct ui_out *uiout, - catch_exceptions_ftype *func, - void *func_args, - char *errstring, - return_mask mask) -{ - int val; - enum return_reason caught; - catcher (func, uiout, func_args, &val, &caught, errstring, NULL, mask); - gdb_assert (val >= 0); - gdb_assert (caught <= 0); - if (caught < 0) - return caught; - return val; -} - -int -catch_exceptions_with_msg (struct ui_out *uiout, - catch_exceptions_ftype *func, - void *func_args, - char *errstring, - char **gdberrmsg, - return_mask mask) -{ - int val; - enum return_reason caught; - catcher (func, uiout, func_args, &val, &caught, errstring, gdberrmsg, mask); - gdb_assert (val >= 0); - gdb_assert (caught <= 0); - if (caught < 0) - return caught; - return val; -} - -struct catch_errors_args -{ - catch_errors_ftype *func; - void *func_args; -}; - -static int -do_catch_errors (struct ui_out *uiout, void *data) -{ - struct catch_errors_args *args = data; - return args->func (args->func_args); -} - -int -catch_errors (catch_errors_ftype *func, void *func_args, char *errstring, - return_mask mask) -{ - int val; - enum return_reason caught; - struct catch_errors_args args; - args.func = func; - args.func_args = func_args; - catcher (do_catch_errors, uiout, &args, &val, &caught, errstring, - NULL, mask); - if (caught != 0) - return 0; - return val; -} - -struct captured_command_args - { - catch_command_errors_ftype *command; - char *arg; - int from_tty; - }; - -static int -do_captured_command (void *data) -{ - struct captured_command_args *context = data; - context->command (context->arg, context->from_tty); - /* FIXME: cagney/1999-11-07: Technically this do_cleanups() call - isn't needed. Instead an assertion check could be made that - simply confirmed that the called function correctly cleaned up - after itself. Unfortunately, old code (prior to 1999-11-04) in - main.c was calling SET_TOP_LEVEL(), calling the command function, - and then *always* calling do_cleanups(). For the moment we - remain ``bug compatible'' with that old code.. */ - do_cleanups (ALL_CLEANUPS); - return 1; -} - -int -catch_command_errors (catch_command_errors_ftype * command, - char *arg, int from_tty, return_mask mask) -{ - struct captured_command_args args; - args.command = command; - args.arg = arg; - args.from_tty = from_tty; - return catch_errors (do_captured_command, &args, "", mask); -} - /* Handler for SIGHUP. */ diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 1e1d6432321..b5c3b401962 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -31,6 +31,7 @@ #include "tui/tui-win.h" #include "tui/tui.h" #include "tui/tui-io.h" +#include "exceptions.h" /* Set to 1 when the TUI mode must be activated when we first start gdb. */ static int tui_start_enabled = 0; diff --git a/gdb/utils.c b/gdb/utils.c index 673dc331e9f..17c2e5e6bf3 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -26,6 +26,7 @@ #include #include "gdb_string.h" #include "event-top.h" +#include "exceptions.h" #ifdef TUI #include "tui/tui.h" /* For tui_get_command_dimension. */ diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 9845d46192d..62a3e7cda1a 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -30,6 +30,7 @@ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "target.h" +#include "exceptions.h" #include "gdbcore.h" #include "command.h" #include "completer.h" diff --git a/gdb/wince.c b/gdb/wince.c index 0397bd45c01..34f10dc3857 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -34,6 +34,7 @@ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "target.h" +#include "exceptions.h" #include "gdbcore.h" #include "command.h" #include diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 9845d46192d..62a3e7cda1a 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -30,6 +30,7 @@ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "target.h" +#include "exceptions.h" #include "gdbcore.h" #include "command.h" #include "completer.h" diff --git a/gdb/wrapper.c b/gdb/wrapper.c index 6c9c6d60cef..0e4714e5d07 100644 --- a/gdb/wrapper.c +++ b/gdb/wrapper.c @@ -18,6 +18,7 @@ #include "defs.h" #include "value.h" +#include "exceptions.h" #include "wrapper.h" /* Use this struct to pass arguments to wrapper routines. We assume -- cgit v1.2.1