aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-10-28 18:20:35 +0000
committerMark Kettenis <kettenis@gnu.org>2005-10-28 18:20:35 +0000
commit346e281c43630a5054d66acbc35c0f6aa9dd0224 (patch)
tree4cedb13626525e29397286c0fca7cd61bd28ab9b /gdb
parent656d5e120fe95446e14b8251e85e95218e0479c5 (diff)
downloadgdb-346e281c43630a5054d66acbc35c0f6aa9dd0224.zip
gdb-346e281c43630a5054d66acbc35c0f6aa9dd0224.tar.gz
gdb-346e281c43630a5054d66acbc35c0f6aa9dd0224.tar.bz2
* inf-ttrace.c (inf_ttrace_mourn_inferior): Remove redundant cast.
(inf_ttrace_kill): Renamed from inf_ttrace_kill_inferior. (inf_ttrace_target): Resort assignments.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/inf-ttrace.c70
2 files changed, 41 insertions, 35 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1e9f521..06f6342 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-28 Mark Kettenis <kettenis@gnu.org>
+
+ * inf-ttrace.c (inf_ttrace_mourn_inferior): Remove redundant cast.
+ (inf_ttrace_kill): Renamed from inf_ttrace_kill_inferior.
+ (inf_ttrace_target): Resort assignments.
+
2005-10-28 Nick Roberts <nickrob@snap.net.nz>
* mi/gdb-mi.el: Sync with Emacs 22.0.50.
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index a9087af..84ebb70 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -645,28 +645,6 @@ inf_ttrace_create_inferior (char *exec_file, char *allargs, char **env,
}
static void
-inf_ttrace_kill_inferior (void)
-{
- pid_t pid = ptid_get_pid (inferior_ptid);
-
- if (pid == 0)
- return;
-
- if (ttrace (TT_PROC_EXIT, pid, 0, 0, 0, 0) == -1)
- perror_with_name (("ttrace"));
- /* ??? Is it necessary to call ttrace_wait() here? */
-
- if (inf_ttrace_vfork_ppid != -1)
- {
- if (ttrace (TT_PROC_DETACH, inf_ttrace_vfork_ppid, 0, 0, 0, 0) == -1)
- perror_with_name (("ttrace"));
- inf_ttrace_vfork_ppid = -1;
- }
-
- target_mourn_inferior ();
-}
-
-static void
inf_ttrace_mourn_inferior (void)
{
const int num_buckets = ARRAY_SIZE (inf_ttrace_page_dict.buckets);
@@ -715,7 +693,7 @@ inf_ttrace_attach (char *args, int from_tty)
if (from_tty)
{
- exec_file = (char *) get_exec_file (0);
+ exec_file = get_exec_file (0);
if (exec_file)
printf_unfiltered (_("Attaching to program: %s, %s\n"), exec_file,
@@ -792,6 +770,28 @@ inf_ttrace_detach (char *args, int from_tty)
inferior_ptid = null_ptid;
}
+static void
+inf_ttrace_kill (void)
+{
+ pid_t pid = ptid_get_pid (inferior_ptid);
+
+ if (pid == 0)
+ return;
+
+ if (ttrace (TT_PROC_EXIT, pid, 0, 0, 0, 0) == -1)
+ perror_with_name (("ttrace"));
+ /* ??? Is it necessary to call ttrace_wait() here? */
+
+ if (inf_ttrace_vfork_ppid != -1)
+ {
+ if (ttrace (TT_PROC_DETACH, inf_ttrace_vfork_ppid, 0, 0, 0, 0) == -1)
+ perror_with_name (("ttrace"));
+ inf_ttrace_vfork_ppid = -1;
+ }
+
+ target_mourn_inferior ();
+}
+
static int
inf_ttrace_resume_callback (struct thread_info *info, void *arg)
{
@@ -1081,9 +1081,9 @@ inf_ttrace_xfer_partial (struct target_ops *ops, enum target_object object,
static void
inf_ttrace_files_info (struct target_ops *ignore)
{
- printf_unfiltered (_("\tUsing the running image of %s %s.\n"),
- attach_flag ? "attached" : "child",
- target_pid_to_str (inferior_ptid));
+ printf_filtered (_("\tUsing the running image of %s %s.\n"),
+ attach_flag ? "attached" : "child",
+ target_pid_to_str (inferior_ptid));
}
static int
@@ -1115,24 +1115,24 @@ inf_ttrace_target (void)
{
struct target_ops *t = inf_child_target ();
- t->to_create_inferior = inf_ttrace_create_inferior;
- t->to_kill = inf_ttrace_kill_inferior;
- t->to_mourn_inferior = inf_ttrace_mourn_inferior;
t->to_attach = inf_ttrace_attach;
t->to_detach = inf_ttrace_detach;
t->to_resume = inf_ttrace_resume;
t->to_wait = inf_ttrace_wait;
- t->to_xfer_partial = inf_ttrace_xfer_partial;
t->to_files_info = inf_ttrace_files_info;
- t->to_thread_alive = inf_ttrace_thread_alive;
- t->to_pid_to_str = inf_ttrace_pid_to_str;
- t->to_follow_fork = inf_ttrace_follow_fork;
t->to_can_use_hw_breakpoint = inf_ttrace_can_use_hw_breakpoint;
- t->to_region_size_ok_for_hw_watchpoint =
- inf_ttrace_region_size_ok_for_hw_watchpoint;
t->to_insert_watchpoint = inf_ttrace_insert_watchpoint;
t->to_remove_watchpoint = inf_ttrace_remove_watchpoint;
t->to_stopped_by_watchpoint = inf_ttrace_stopped_by_watchpoint;
+ t->to_region_size_ok_for_hw_watchpoint =
+ inf_ttrace_region_size_ok_for_hw_watchpoint;
+ t->to_kill = inf_ttrace_kill;
+ t->to_create_inferior = inf_ttrace_create_inferior;
+ t->to_follow_fork = inf_ttrace_follow_fork;
+ t->to_mourn_inferior = inf_ttrace_mourn_inferior;
+ t->to_thread_alive = inf_ttrace_thread_alive;
+ t->to_pid_to_str = inf_ttrace_pid_to_str;
+ t->to_xfer_partial = inf_ttrace_xfer_partial;
ttrace_ops_hack = t;
return t;