Move infrun.c declarations out of inferior.h to a new infrun.h file.
Tested by building on:
i686-w64-mingw32, enable-targets=all
x86_64-linux, enable-targets=all
i586-pc-msdosdjgpp
And also grepped the whole tree for each symbol moved to find where
infrun.h might be necessary.
gdb/
2014-05-22 Pedro Alves <palves@redhat.com>
* inferior.h (debug_infrun, debug_displaced, stop_on_solib_events)
(sync_execution, sched_multi, step_stop_if_no_debug, non_stop)
(disable_randomization, enum exec_direction_kind)
(execution_direction, stop_registers, start_remote)
(clear_proceed_status, proceed, resume, user_visible_resume_ptid)
(wait_for_inferior, normal_stop, get_last_target_status)
(prepare_for_detach, fetch_inferior_event, init_wait_for_inferior)
(insert_step_resume_breakpoint_at_sal)
(follow_inferior_reset_breakpoints, stepping_past_instruction_at)
(set_step_info, print_stop_event, signal_stop_state)
(signal_print_state, signal_pass_state, signal_stop_update)
(signal_print_update, signal_pass_update)
(update_signals_program_target, clear_exit_convenience_vars)
(displaced_step_dump_bytes, update_observer_mode)
(signal_catch_update, gdb_signal_from_command): Move
declarations ...
* infrun.h: ... to this new file.
* amd64-tdep.c: Include infrun.h.
* annotate.c: Include infrun.h.
* arch-utils.c: Include infrun.h.
* arm-linux-tdep.c: Include infrun.h.
* arm-tdep.c: Include infrun.h.
* break-catch-sig.c: Include infrun.h.
* breakpoint.c: Include infrun.h.
* common/agent.c: Include infrun.h instead of inferior.h.
* corelow.c: Include infrun.h.
* event-top.c: Include infrun.h.
* go32-nat.c: Include infrun.h.
* i386-tdep.c: Include infrun.h.
* inf-loop.c: Include infrun.h.
* infcall.c: Include infrun.h.
* infcmd.c: Include infrun.h.
* infrun.c: Include infrun.h.
* linux-fork.c: Include infrun.h.
* linux-nat.c: Include infrun.h.
* linux-thread-db.c: Include infrun.h.
* monitor.c: Include infrun.h.
* nto-tdep.c: Include infrun.h.
* procfs.c: Include infrun.h.
* record-btrace.c: Include infrun.h.
* record-full.c: Include infrun.h.
* remote-m32r-sdi.c: Include infrun.h.
* remote-mips.c: Include infrun.h.
* remote-notif.c: Include infrun.h.
* remote-sim.c: Include infrun.h.
* remote.c: Include infrun.h.
* reverse.c: Include infrun.h.
* rs6000-tdep.c: Include infrun.h.
* s390-linux-tdep.c: Include infrun.h.
* solib-irix.c: Include infrun.h.
* solib-osf.c: Include infrun.h.
* solib-svr4.c: Include infrun.h.
* target.c: Include infrun.h.
* top.c: Include infrun.h.
* windows-nat.c: Include infrun.h.
* mi/mi-interp.c: Include infrun.h.
* mi/mi-main.c: Include infrun.h.
* python/py-threadevent.c: Include infrun.h.
After the previous patch, there's actually no breakpoint type that
returns BPSTAT_SIGNAL_HIDE, so we can go back to having
bpstat_explains_signal return a boolean. The signal hiding actually
disappears.
gdb/
2013-11-14 Pedro Alves <palves@redhat.com>
* break-catch-sig.c (signal_catchpoint_explains_signal): Adjust to
return a boolean.
* breakpoint.c (bpstat_explains_signal): Adjust to return a
boolean.
(explains_signal_watchpoint, base_breakpoint_explains_signal):
Adjust to return a boolean.
* breakpoint.h (enum bpstat_signal_value): Delete.
(struct breakpoint_ops) <explains_signal>: New returns a boolean.
(bpstat_explains_signal): Likewise.
* infrun.c (handle_inferior_event) <random signal checks>:
bpstat_explains_signal now returns a boolean - adjust. No longer
consider hiding signals.
This fixes PR cli/15603.
The bug here is that when a software watchpoint is being used, gdb
will stop responding to C-c. This is a regression caused by the
"catch signal" patch.
The problem is that software watchpoints always end up on the bpstat
list. However, this makes bpstat_explains_signal return
BPSTAT_SIGNAL_HIDE, causing infrun to think that the signal is not a
"random signal".
The fix is to change bpstat_explains_signal to handle this better. I
chose to do it in a "clean API" way, by passing the signal value to
bpstat_explains_signal and then adding an explains_signal method for
watchpoints, which handles the specifics.
Built and regtested on x86-64 Fedora 18.
New test case included.
* break-catch-sig.c (signal_catchpoint_explains_signal): Add 'sig'
argument.
* breakpoint.c (bpstat_explains_signal): Add 'sig' argument.
Special case signals other than GDB_SIGNAL_TRAP.
(explains_signal_watchpoint): New function.
(base_breakpoint_explains_signal): Add 'sig' argument.
(initialize_breakpoint_ops): Set 'explains_signal' method for
watchpoints.
* breakpoint.h (struct breakpoint_ops) <explains_signal>: Add
signal argument.
(bpstat_explains_signal): Likewise.
* infrun.c (handle_syscall_event, handle_inferior_event): Update.
* gdb.base/random-signal.c: New file.
* gdb.base/random-signal.exp: New file.
Some files managed to get in the tree with outdated copyright years.
This fixes it. Applied.
gdb/
2013-02-12 Pedro Alves <palves@redhat.com>
* break-catch-sig.c: Update copyright years.
gdb/testsuite/
2013-02-12 Pedro Alves <palves@redhat.com>
* gdb.base/catch-signal.c: Update copyright years.
* gdb.base/catch-signal.exp: Update copyright years.
* gdb.dwarf2/dw2-dir-file-name.c: Update copyright years.
* gdb.dwarf2/dw2-dir-file-name.exp: Update copyright years.
* gdb.dwarf2/dw2-empty-pc-range.S: Update copyright years.
* gdb.dwarf2/dw2-error.S: Update copyright years.
* gdb.dwarf2/dw2-error.c: Update copyright years.
* gdb.dwarf2/dw2-restrict.S: Update copyright years.
* gdb.dwarf2/dw2-restrict.c: Update copyright years.
* gdb.dwarf2/dw2-restrict.exp: Update copyright years.