OLD | NEW |
1 /* Target-struct-independent code to start (run) and stop an inferior | 1 /* Target-struct-independent code to start (run) and stop an inferior |
2 process. | 2 process. |
3 | 3 |
4 Copyright (C) 1986-2012 Free Software Foundation, Inc. | 4 Copyright (C) 1986-2012 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of GDB. | 6 This file is part of GDB. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "gdb_assert.h" | 48 #include "gdb_assert.h" |
49 #include "mi/mi-common.h" | 49 #include "mi/mi-common.h" |
50 #include "event-top.h" | 50 #include "event-top.h" |
51 #include "record.h" | 51 #include "record.h" |
52 #include "inline-frame.h" | 52 #include "inline-frame.h" |
53 #include "jit.h" | 53 #include "jit.h" |
54 #include "tracepoint.h" | 54 #include "tracepoint.h" |
55 #include "continuations.h" | 55 #include "continuations.h" |
56 #include "interps.h" | 56 #include "interps.h" |
57 #include "skip.h" | 57 #include "skip.h" |
| 58 #include "probe.h" |
| 59 #include "objfiles.h" |
58 | 60 |
59 /* Prototypes for local functions */ | 61 /* Prototypes for local functions */ |
60 | 62 |
61 static void signals_info (char *, int); | 63 static void signals_info (char *, int); |
62 | 64 |
63 static void handle_command (char *, int); | 65 static void handle_command (char *, int); |
64 | 66 |
65 static void sig_print_info (enum target_signal); | 67 static void sig_print_info (enum gdb_signal); |
66 | 68 |
67 static void sig_print_header (void); | 69 static void sig_print_header (void); |
68 | 70 |
69 static void resume_cleanups (void *); | 71 static void resume_cleanups (void *); |
70 | 72 |
71 static int hook_stop_stub (void *); | 73 static int hook_stop_stub (void *); |
72 | 74 |
73 static int restore_selected_frame (void *); | 75 static int restore_selected_frame (void *); |
74 | 76 |
75 static int follow_fork (void); | 77 static int follow_fork (void); |
76 | 78 |
77 static void set_schedlock_func (char *args, int from_tty, | 79 static void set_schedlock_func (char *args, int from_tty, |
78 struct cmd_list_element *c); | 80 struct cmd_list_element *c); |
79 | 81 |
80 static int currently_stepping (struct thread_info *tp); | 82 static int currently_stepping (struct thread_info *tp); |
81 | 83 |
82 static int currently_stepping_or_nexting_callback (struct thread_info *tp, | 84 static int currently_stepping_or_nexting_callback (struct thread_info *tp, |
83 void *data); | 85 void *data); |
84 | 86 |
85 static void xdb_handle_command (char *args, int from_tty); | 87 static void xdb_handle_command (char *args, int from_tty); |
86 | 88 |
87 static int prepare_to_proceed (int); | 89 static int prepare_to_proceed (int); |
88 | 90 |
89 static void print_exited_reason (int exitstatus); | 91 static void print_exited_reason (int exitstatus); |
90 | 92 |
91 static void print_signal_exited_reason (enum target_signal siggnal); | 93 static void print_signal_exited_reason (enum gdb_signal siggnal); |
92 | 94 |
93 static void print_no_history_reason (void); | 95 static void print_no_history_reason (void); |
94 | 96 |
95 static void print_signal_received_reason (enum target_signal siggnal); | 97 static void print_signal_received_reason (enum gdb_signal siggnal); |
96 | 98 |
97 static void print_end_stepping_range_reason (void); | 99 static void print_end_stepping_range_reason (void); |
98 | 100 |
99 void _initialize_infrun (void); | 101 void _initialize_infrun (void); |
100 | 102 |
101 void nullify_last_target_wait_ptid (void); | 103 void nullify_last_target_wait_ptid (void); |
102 | 104 |
103 static void insert_hp_step_resume_breakpoint_at_frame (struct frame_info *); | 105 static void insert_hp_step_resume_breakpoint_at_frame (struct frame_info *); |
104 | 106 |
105 static void insert_step_resume_breakpoint_at_caller (struct frame_info *); | 107 static void insert_step_resume_breakpoint_at_caller (struct frame_info *); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } while (0) | 330 } while (0) |
329 | 331 |
330 #define UNSET_SIGS(nsigs,sigs,flags) \ | 332 #define UNSET_SIGS(nsigs,sigs,flags) \ |
331 do { \ | 333 do { \ |
332 int signum = (nsigs); \ | 334 int signum = (nsigs); \ |
333 while (signum-- > 0) \ | 335 while (signum-- > 0) \ |
334 if ((sigs)[signum]) \ | 336 if ((sigs)[signum]) \ |
335 (flags)[signum] = 0; \ | 337 (flags)[signum] = 0; \ |
336 } while (0) | 338 } while (0) |
337 | 339 |
| 340 /* Update the target's copy of SIGNAL_PROGRAM. The sole purpose of |
| 341 this function is to avoid exporting `signal_program'. */ |
| 342 |
| 343 void |
| 344 update_signals_program_target (void) |
| 345 { |
| 346 target_program_signals ((int) GDB_SIGNAL_LAST, signal_program); |
| 347 } |
| 348 |
338 /* Value to pass to target_resume() to cause all threads to resume. */ | 349 /* Value to pass to target_resume() to cause all threads to resume. */ |
339 | 350 |
340 #define RESUME_ALL minus_one_ptid | 351 #define RESUME_ALL minus_one_ptid |
341 | 352 |
342 /* Command list pointer for the "stop" placeholder. */ | 353 /* Command list pointer for the "stop" placeholder. */ |
343 | 354 |
344 static struct cmd_list_element *stop_command; | 355 static struct cmd_list_element *stop_command; |
345 | 356 |
346 /* Function inferior was in as of last step command. */ | 357 /* Function inferior was in as of last step command. */ |
347 | 358 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 393 |
383 static void context_switch (ptid_t ptid); | 394 static void context_switch (ptid_t ptid); |
384 | 395 |
385 void init_thread_stepping_state (struct thread_info *tss); | 396 void init_thread_stepping_state (struct thread_info *tss); |
386 | 397 |
387 void init_infwait_state (void); | 398 void init_infwait_state (void); |
388 | 399 |
389 static const char follow_fork_mode_child[] = "child"; | 400 static const char follow_fork_mode_child[] = "child"; |
390 static const char follow_fork_mode_parent[] = "parent"; | 401 static const char follow_fork_mode_parent[] = "parent"; |
391 | 402 |
392 static const char *follow_fork_mode_kind_names[] = { | 403 static const char *const follow_fork_mode_kind_names[] = { |
393 follow_fork_mode_child, | 404 follow_fork_mode_child, |
394 follow_fork_mode_parent, | 405 follow_fork_mode_parent, |
395 NULL | 406 NULL |
396 }; | 407 }; |
397 | 408 |
398 static const char *follow_fork_mode_string = follow_fork_mode_parent; | 409 static const char *follow_fork_mode_string = follow_fork_mode_parent; |
399 static void | 410 static void |
400 show_follow_fork_mode_string (struct ui_file *file, int from_tty, | 411 show_follow_fork_mode_string (struct ui_file *file, int from_tty, |
401 struct cmd_list_element *c, const char *value) | 412 struct cmd_list_element *c, const char *value) |
402 { | 413 { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 612 |
602 /* The child has exited or execed: resume threads of the parent the | 613 /* The child has exited or execed: resume threads of the parent the |
603 user wanted to be executing. */ | 614 user wanted to be executing. */ |
604 | 615 |
605 static int | 616 static int |
606 proceed_after_vfork_done (struct thread_info *thread, | 617 proceed_after_vfork_done (struct thread_info *thread, |
607 void *arg) | 618 void *arg) |
608 { | 619 { |
609 int pid = * (int *) arg; | 620 int pid = * (int *) arg; |
610 | 621 |
error: old chunk mismatch |
None
OLD | NEW |