summaryrefslogtreecommitdiffstats
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-11-22 21:25:19 +0000
committerTom Tromey <tromey@redhat.com>2011-11-22 21:25:19 +0000
commit36dfb11c8b13be20baf34ea4ba772255c605e0ed (patch)
tree3ceaaac3e36cd7c63643651e043b533227305d3d /gdb/mi
parent5bd6aa835706da4799d994bfee65f205ce2d5304 (diff)
downloadppe42-binutils-36dfb11c8b13be20baf34ea4ba772255c605e0ed.tar.gz
ppe42-binutils-36dfb11c8b13be20baf34ea4ba772255c605e0ed.zip
gdb
PR mi/8444: * mi/mi-common.h (EXEC_ASYNC_SOLIB_EVENT, EXEC_ASYNC_FORK) (EXEC_ASYNC_VFORK, EXEC_ASYNC_SYSCALL_ENTRY) (EXEC_ASYNC_SYSCALL_RETURN, EXEC_ASYNC_EXEC): New constants. * mi/mi-common.c (async_reason_string_lookup): Add new reasons. * breakpoint.c (print_it_catch_fork, print_it_catch_vfork) (print_it_catch_syscall, print_it_catch_exec) (internal_bkpt_print_it): Use ui_out. Emit stop reason. (bpstat_print): Add 'kind' argument. Handle TARGET_WAITKIND_LOADED. * infrun.c (normal_stop): Update for bpstat_print change. Don't handle TARGET_WAITKIND_LOADED here. * breakpoint.h (bpstat_print): Update. gdb/testsuite * lib/mi-support.exp (mi_run_cmd_full): Rename from mi_run_cmd. Add "use_mi_command" argument. (mi_run_cmd, mi_run_with_cli): New procs. * gdb.mi/solib-lib.c: New file. * gdb.mi/solib-main.c: New file. * gdb.mi/mi-solib.exp: New file. gdb/doc * gdb.texinfo (GDB/MI Async Records): Document new *stopped reasons.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-common.c6
-rw-r--r--gdb/mi/mi-common.h6
-rw-r--r--gdb/mi/mi-interp.c7
3 files changed, 18 insertions, 1 deletions
diff --git a/gdb/mi/mi-common.c b/gdb/mi/mi-common.c
index e7dd3c46c8..8fb9799ddc 100644
--- a/gdb/mi/mi-common.c
+++ b/gdb/mi/mi-common.c
@@ -35,6 +35,12 @@ static const char * const async_reason_string_lookup[] =
"exited",
"exited-normally",
"signal-received",
+ "solib-event",
+ "fork",
+ "vfork",
+ "syscall-entry",
+ "syscall-return",
+ "exec",
NULL
};
diff --git a/gdb/mi/mi-common.h b/gdb/mi/mi-common.h
index dc5fc8e170..9ecc5a1f08 100644
--- a/gdb/mi/mi-common.h
+++ b/gdb/mi/mi-common.h
@@ -37,6 +37,12 @@ enum async_reply_reason
EXEC_ASYNC_EXITED,
EXEC_ASYNC_EXITED_NORMALLY,
EXEC_ASYNC_SIGNAL_RECEIVED,
+ EXEC_ASYNC_SOLIB_EVENT,
+ EXEC_ASYNC_FORK,
+ EXEC_ASYNC_VFORK,
+ EXEC_ASYNC_SYSCALL_ENTRY,
+ EXEC_ASYNC_SYSCALL_RETURN,
+ EXEC_ASYNC_EXEC,
/* This is here only to represent the number of enums. */
EXEC_ASYNC_LAST
};
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 2aec1c717d..b075e33c16 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -427,9 +427,14 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame)
the frame again. In practice, this can only happen when running
a CLI command in MI. */
struct ui_out *saved_uiout = current_uiout;
+ struct target_waitstatus last;
+ ptid_t last_ptid;
current_uiout = mi_uiout;
- bpstat_print (bs);
+
+ get_last_target_status (&last_ptid, &last);
+ bpstat_print (bs, last.kind);
+
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
current_uiout = saved_uiout;
}
OpenPOWER on IntegriCloud