summaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-07-09 22:30:46 +0000
committerPedro Alves <pedro@codesourcery.com>2008-07-09 22:30:46 +0000
commit0c543cd7d677a39d7d2c368deaaaad1d58b91e7a (patch)
tree216dcaa9f0d28a03c8e46afc314917c8a43ab241 /gdb/gdbthread.h
parent630d21a6ea3b02f5af279bee5345acd93a17513c (diff)
downloadgdb-0c543cd7d677a39d7d2c368deaaaad1d58b91e7a.tar.gz
Per-thread commands.
* gdbthread.h: Remove unneeded forward declarations. Include "inferior.h". (struct thread_info): Add continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi and stop_signal members. (save_infrun_state): Add continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi, stop_signal and stop_bpstat parameters. (load_infrun_state): Add continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi, stop_signal and stop_bpstat parameters. * thread.c (load_infrun_state): In non-stop mode, load continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi and stop_signal. (save_infrun_state): Store continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi, stop_signal and stop_bpstat. (save_infrun_state): Store continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi, stop_signal and stop_bpstat. (free_thread): Clear The thread's stop_bpstat. * inferior.h (context_switch_to): Declare. * infrun.c (ecss): New global. (context_switch): Context switch continuations, intermediate_continuations, proceed_to_finish, step_over_calls, stop_step, step_multi, stop_signal and stop_bpstat. (wait_for_inferior): Use global ecss. (async_ecss, async_ecs): Delete. (fetch_inferior_event): Use global ecss. (context_switch_to): New. * top.c (execute_command): In non-stop, only check if the current thread is running, in all-stop, check if there's any thread running. * breakpoint.c (bpstat_remove_breakpoint): New. (bpstat_remove_breakpoint_callback): New. (delete_breakpoint): Clear the stop_bpstats of all threads. * mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the current thread is running, in all-stop, check if there's any thread running. * Makefile.in (gdbthread_h): Depend on $(inferior_h).
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 389b2fc24fc..76b8f6cb539 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -22,17 +22,12 @@
#ifndef GDBTHREAD_H
#define GDBTHREAD_H
-struct breakpoint;
-struct frame_id;
struct symtab;
-/* For bpstat */
#include "breakpoint.h"
-
-/* For struct frame_id. */
#include "frame.h"
-
#include "ui-out.h"
+#include "inferior.h"
struct thread_info
{
@@ -82,6 +77,20 @@ struct thread_info
when we finally do stop stepping. */
bpstat stepping_through_solib_catchpoints;
+ /* The below are only per-thread in non-stop mode. */
+ /* Per-thread command support. */
+ struct continuation *continuations;
+ struct continuation *intermediate_continuations;
+ int proceed_to_finish;
+ enum step_over_calls_kind step_over_calls;
+ int stop_step;
+ int step_multi;
+
+ enum target_signal stop_signal;
+ /* Used in continue_command to set the proceed count of the
+ breakpoint the thread stopped at. */
+ bpstat stop_bpstat;
+
/* Private data used by the target vector implementation. */
struct private_thread_info *private;
};
@@ -152,7 +161,15 @@ extern void save_infrun_state (ptid_t ptid,
int stepping_through_solib_after_catch,
bpstat stepping_through_solib_catchpoints,
int current_line,
- struct symtab *current_symtab);
+ struct symtab *current_symtab,
+ struct continuation *continuations,
+ struct continuation *intermediate_continuations,
+ int proceed_to_finish,
+ enum step_over_calls_kind step_over_calls,
+ int stop_step,
+ int step_multi,
+ enum target_signal stop_signal,
+ bpstat stop_bpstat);
/* infrun context switch: load the debugger state previously saved
for the given thread. */
@@ -164,10 +181,18 @@ extern void load_infrun_state (ptid_t ptid,
CORE_ADDR *step_range_end,
struct frame_id *step_frame_id,
int *another_trap,
- int *stepping_through_solib_affter_catch,
+ int *stepping_through_solib_after_catch,
bpstat *stepping_through_solib_catchpoints,
int *current_line,
- struct symtab **current_symtab);
+ struct symtab **current_symtab,
+ struct continuation **continuations,
+ struct continuation **intermediate_continuations,
+ int *proceed_to_finish,
+ enum step_over_calls_kind *step_over_calls,
+ int *stop_step,
+ int *step_multi,
+ enum target_signal *stop_signal,
+ bpstat *stop_bpstat);
/* Switch from one thread to another. */
extern void switch_to_thread (ptid_t ptid);