* [PATCH v2] Show the selected frame in "bt"
@ 2026-07-05 12:26 Tom Tromey
2026-07-05 13:06 ` Eli Zaretskii
2026-07-21 14:55 ` Philippe Waroquiers
0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2026-07-05 12:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I've occasionally wished that "bt" would indicate the selected frame.
This patch implements this idea. In particular it marks the selected
frame with "*", similar to other "selected" output in gdb. (See that
other series where emoji were allowed in the "current" column of a
table; if that is ever resurrected, I'd expect the same treatment to
be applied here.)
Now the output looks like:
(gdb) bt
#0 0x00007ffff6e381fd in poll () from /lib64/libc.so.6
#1 0x000000000100b1ee in gdb_wait_for_event (block=1) at ../../binutils-gdb/gdbsupport/event-loop.cc:587
#2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263
* #3 0x00000000007d2c6a in interp::do_one_event (this=<optimized out>, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90
#4 start_event_loop () at ../../binutils-gdb/gdb/main.c:400
#5 captured_command_loop () at ../../binutils-gdb/gdb/main.c:465
#6 0x00000000007d5715 in captured_main (context=context@entry=0x7fffffffdd10) at ../../binutils-gdb/gdb/main.c:1373
#7 gdb_main (args=args@entry=0x7fffffffdd50) at ../../binutils-gdb/gdb/main.c:1392
#8 0x0000000000452cd5 in main (argc=1, argv=0x7fffffffdea8) at ../../binutils-gdb/gdb/gdb.c:38
I think the main downside of this patch is that it uses a little more
horizontal space for the indicator.
Compared to v1, this version just fixes the test suite. Note that
there may be other tests that need updating but that I couldn't test.
Regression tested on x86-64 Fedora 40.
---
gdb/NEWS | 3 +
gdb/doc/gdb.texinfo | 62 ++--
gdb/extension-priv.h | 3 +-
gdb/extension.c | 8 +-
gdb/extension.h | 3 +-
gdb/frame.h | 3 +-
gdb/gstack-1.in | 2 +-
gdb/mi/mi-cmd-stack.c | 8 +-
gdb/python/py-framefilter.c | 18 +-
gdb/python/python-internal.h | 3 +-
gdb/stack.c | 39 ++-
.../gdb.ada/out_of_line_in_inlined.exp | 6 +-
gdb/testsuite/gdb.arch/amd64-entry-value.exp | 52 +--
.../gdb.arch/amd64-invalid-stack-middle.exp | 4 +-
.../gdb.arch/amd64-invalid-stack-top.exp | 4 +-
gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp | 2 +-
.../gdb.arch/amd64-tailcall-noret.exp | 2 +-
.../gdb.arch/amd64-tailcall-self.exp | 2 +-
.../gdb.arch/i386-attach-see-vdso.exp | 2 +-
gdb/testsuite/gdb.arch/i386-signal.exp | 2 +-
gdb/testsuite/gdb.base/annota1.exp | 6 +-
.../gdb.base/backtrace-through-cu-nodebug.exp | 8 +-
gdb/testsuite/gdb.base/backtrace.exp | 16 +-
.../gdb.base/bad-frame-selection.exp | 16 +-
gdb/testsuite/gdb.base/break-interp.exp | 6 +-
gdb/testsuite/gdb.base/break.exp | 4 +-
gdb/testsuite/gdb.base/bt-selected-frame.exp | 12 +-
gdb/testsuite/gdb.base/dfp-test.exp | 6 +-
gdb/testsuite/gdb.base/frame-args.exp | 2 +-
gdb/testsuite/gdb.base/frame-selection.exp | 6 +-
gdb/testsuite/gdb.base/funcargs.exp | 316 +++++++++---------
gdb/testsuite/gdb.base/gcore.exp | 18 +-
gdb/testsuite/gdb.base/gdb1250.exp | 4 +-
gdb/testsuite/gdb.base/gstack.exp | 2 +-
gdb/testsuite/gdb.base/hbreak2.exp | 6 +-
.../gdb.base/inline-frame-cycle-unwind.exp | 38 +--
gdb/testsuite/gdb.base/jit-reader.exp | 16 +-
gdb/testsuite/gdb.base/large-frame.exp | 6 +-
gdb/testsuite/gdb.base/pc-not-saved.exp | 6 +-
gdb/testsuite/gdb.base/readnever.exp | 8 +-
gdb/testsuite/gdb.base/recpar.exp | 2 +-
gdb/testsuite/gdb.base/sepdebug.exp | 6 +-
gdb/testsuite/gdb.base/sigaltstack.exp | 16 +-
gdb/testsuite/gdb.base/siginfo.exp | 6 +-
gdb/testsuite/gdb.base/sigstep.exp | 18 +-
gdb/testsuite/gdb.base/tailcall-msym.exp | 6 +-
gdb/testsuite/gdb.base/until-in-tailcall.exp | 6 +-
.../gdb.base/unwind-on-each-insn.exp.tcl | 2 +-
gdb/testsuite/gdb.btrace/record_goto.exp | 6 +-
gdb/testsuite/gdb.btrace/tailcall.exp | 6 +-
gdb/testsuite/gdb.compile/compile-cplus.exp | 2 +-
gdb/testsuite/gdb.cp/exception.exp | 8 +-
gdb/testsuite/gdb.cp/expand-sals.exp | 2 +-
gdb/testsuite/gdb.cp/pass-by-ref-2.exp | 8 +-
.../gdb.dwarf2/debug-frame-no-cfa.exp | 2 +-
gdb/testsuite/gdb.dwarf2/debug-frame.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp | 12 +-
gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp | 4 +-
.../gdb.dwarf2/dw2-inline-many-frames.exp | 24 +-
gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp | 8 +-
gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 8 +-
.../gdb.dwarf2/dw2-reg-undefined.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 2 +-
.../gdb.dwarf2/dw2-wrong-mangled-name.exp | 4 +-
gdb/testsuite/gdb.fortran/backtrace.exp | 6 +-
.../gdb.fortran/mixed-lang-stack.exp | 20 +-
gdb/testsuite/gdb.opt/empty-inline-cxx.exp | 14 +-
gdb/testsuite/gdb.opt/inline-bt.exp | 6 +-
.../gdb.python/pretty-print-call-by-hand.exp | 24 +-
.../py-finish-breakpoint-tailcall.exp | 6 +-
.../gdb.python/py-framefilter-addr.exp | 16 +-
.../gdb.python/py-inf-exited-at-exit.exp | 4 +-
.../gdb.python/py-pending-frame-level.exp | 20 +-
.../gdb.python/py-recurse-unwind.exp | 8 +-
gdb/testsuite/gdb.python/py-unwind-inline.exp | 4 +-
gdb/testsuite/gdb.python/py-unwind-maint.exp | 2 +-
.../gdb.python/py-unwind-user-regs.exp | 14 +-
gdb/testsuite/gdb.python/py-unwind.exp | 10 +-
.../gdb.threads/pthread_cond_wait.exp | 2 +-
gdb/testsuite/gdb.trace/entry-values.exp | 14 +-
81 files changed, 552 insertions(+), 512 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index 343828a85dd..2e15ff06e32 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,9 @@
*** Changes since GDB 17
+* GDB now shows a "*" marker next to the currently selected frame in a
+ backtrace.
+
* Support for the Common Trace Format (CTF) has been removed. GDB now
saves trace information exclusively in its own "tfile" format.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index a698b2b8451..9f8067f1669 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -707,15 +707,15 @@ stack frame for each active subroutine.
@smallexample
(@value{GDBP}) @b{bt}
-#0 set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
+* #0 set_quotes (lq=0x34c78 "<QUOTE>", rq=0x34c88 "<UNQUOTE>")
at input.c:530
-#1 0x6344 in m4_changequote (argc=3, argv=0x33c70)
+ #1 0x6344 in m4_changequote (argc=3, argv=0x33c70)
at builtin.c:882
-#2 0x8174 in expand_macro (sym=0x33320) at macro.c:242
-#3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30)
+ #2 0x8174 in expand_macro (sym=0x33320) at macro.c:242
+ #3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30)
at macro.c:71
-#4 0x79dc in expand_input () at macro.c:40
-#5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195
+ #4 0x79dc in expand_input () at macro.c:40
+ #5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195
@end smallexample
@noindent
@@ -13589,13 +13589,13 @@ Example:
@smallexample
(@value{GDBP}) backtrace
-#0 bottom_func ()
+* #0 bottom_func ()
at testsuite/gdb.python/py-caller-is.c:21
-#1 0x00000000004005a0 in middle_func ()
+ #1 0x00000000004005a0 in middle_func ()
at testsuite/gdb.python/py-caller-is.c:27
-#2 0x00000000004005ab in top_func ()
+ #2 0x00000000004005ab in top_func ()
at testsuite/gdb.python/py-caller-is.c:33
-#3 0x00000000004005b6 in main ()
+ #3 0x00000000004005b6 in main ()
at testsuite/gdb.python/py-caller-is.c:39
(@value{GDBP}) print $_caller_is ("middle_func")
$1 = 1
@@ -14961,8 +14961,8 @@ DW_TAG_call_site 0x40039a in main
a () at t.c:3
3 static void __attribute__((noinline, noclone)) a (void) @{ x++; @}
(@value{GDBP}) bt
-#0 a () at t.c:3
-#1 0x000000000040039a in main () at t.c:5
+* #0 a () at t.c:3
+ #1 0x000000000040039a in main () at t.c:5
@end smallexample
Another possibility is an ambiguous virtual tail call frames resolution:
@@ -14982,9 +14982,9 @@ tailcall: initial: 0x4004d2(a) 0x4004ce(b) 0x4004b2(c) 0x4004a2(d)
tailcall: compare: 0x4004d2(a) 0x4004cc(b) 0x400492(e)
tailcall: reduced: 0x4004d2(a) |
(@value{GDBP}) bt
-#0 f () at t.c:2
-#1 0x00000000004004d2 in a () at t.c:8
-#2 0x0000000000400395 in main () at t.c:9
+* #0 f () at t.c:2
+ #1 0x00000000004004d2 in a () at t.c:8
+ #2 0x0000000000400395 in main () at t.c:9
@end smallexample
@set CALLSEQ1A @code{main@value{ARROW}a@value{ARROW}b@value{ARROW}c@value{ARROW}d@value{ARROW}f}
@@ -15032,11 +15032,11 @@ static void __attribute__((noinline, noclone)) a (int i)
int main (void) @{ a (5); return 0; @}
(@value{GDBP}) bt
-#0 c (i=i@@entry=0) at t.c:2
-#1 0x0000000000400428 in a (DW_OP_entry_value resolving has found
-function "a" at 0x400420 can call itself via tail calls
-i=<optimized out>) at t.c:6
-#2 0x000000000040036e in main () at t.c:7
+* #0 c (i=i@@entry=0) at t.c:2
+ #1 0x0000000000400428 in a (DW_OP_entry_value resolving has found
+ function "a" at 0x400420 can call itself via tail calls
+ i=<optimized out>) at t.c:6
+ #2 0x000000000040036e in main () at t.c:7
@end smallexample
@value{GDBN} cannot find out from the inferior state if and how many times did
@@ -19672,11 +19672,11 @@ from the current task to the given task.
[Switching to task 1 "main_task"]
#0 0x8067726 in pthread_cond_wait ()
(@value{GDBP}) bt
-#0 0x8067726 in pthread_cond_wait ()
-#1 0x8056714 in system.os_interface.pthread_cond_wait ()
-#2 0x805cb63 in system.task_primitives.operations.sleep ()
-#3 0x806153e in system.tasking.stages.activate_tasks ()
-#4 0x804aacc in un () at un.adb:5
+* #0 0x8067726 in pthread_cond_wait ()
+ #1 0x8056714 in system.os_interface.pthread_cond_wait ()
+ #2 0x805cb63 in system.task_primitives.operations.sleep ()
+ #3 0x806153e in system.tasking.stages.activate_tasks ()
+ #4 0x804aacc in un () at un.adb:5
@end smallexample
@item task apply [@var{task-id-list} | all] [@var{flag}]@dots{} @var{command}
@@ -21394,12 +21394,12 @@ backtrace, for example frame @code{#3} in the following backtrace:
@smallexample
(@value{GDBP}) backtrace
-#0 0x00007ffff7b3d1e7 in nanosleep () from /lib64/libc.so.6
-#1 0x00007ffff7b3d11e in sleep () from /lib64/libc.so.6
-#2 0x000000000040113f in deadlock () at test.cc:13
-#3 <function called from gdb>
-#4 breakpt () at test.cc:20
-#5 0x0000000000401151 in main () at test.cc:25
+* #0 0x00007ffff7b3d1e7 in nanosleep () from /lib64/libc.so.6
+ #1 0x00007ffff7b3d11e in sleep () from /lib64/libc.so.6
+ #2 0x000000000040113f in deadlock () at test.cc:13
+ #3 <function called from gdb>
+ #4 breakpt () at test.cc:20
+ #5 0x0000000000401151 in main () at test.cc:25
@end smallexample
At this point it is possible to examine the state of the inferior just
diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h
index 4ef87415413..9b0c4815399 100644
--- a/gdb/extension-priv.h
+++ b/gdb/extension-priv.h
@@ -186,7 +186,8 @@ struct extension_language_ops
(const struct extension_language_defn *,
const frame_info_ptr &frame, frame_filter_flags flags,
enum ext_lang_frame_args args_type,
- struct ui_out *out, int frame_low, int frame_high);
+ struct ui_out *out, int frame_low, int frame_high,
+ const frame_info_ptr &selected_frame);
/* Used for registering the ptwrite filter to the current thread. */
void (*apply_ptwrite_filter)
diff --git a/gdb/extension.c b/gdb/extension.c
index d8ef8123ab5..a57ad4a517a 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -521,7 +521,8 @@ apply_ext_lang_frame_filter (const frame_info_ptr &frame,
frame_filter_flags flags,
enum ext_lang_frame_args args_type,
struct ui_out *out,
- int frame_low, int frame_high)
+ int frame_low, int frame_high,
+ const frame_info_ptr &selected_frame)
{
for (const struct extension_language_defn *extlang : extension_languages)
{
@@ -531,8 +532,9 @@ apply_ext_lang_frame_filter (const frame_info_ptr &frame,
|| extlang->ops->apply_frame_filter == NULL)
continue;
status = extlang->ops->apply_frame_filter (extlang, frame, flags,
- args_type, out,
- frame_low, frame_high);
+ args_type, out,
+ frame_low, frame_high,
+ selected_frame);
/* We use the filters from the first extension language that has
applicable filters. Also, an error is reported immediately
rather than continue trying. */
diff --git a/gdb/extension.h b/gdb/extension.h
index b7bbf2a502d..a328fbe8540 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -302,7 +302,8 @@ extern int apply_ext_lang_val_pretty_printer
extern enum ext_lang_bt_status apply_ext_lang_frame_filter
(const frame_info_ptr &frame, frame_filter_flags flags,
enum ext_lang_frame_args args_type,
- struct ui_out *out, int frame_low, int frame_high);
+ struct ui_out *out, int frame_low, int frame_high,
+ const frame_info_ptr &selected_frame);
extern void apply_ext_lang_ptwrite_filter
(struct btrace_thread_info *btinfo);
diff --git a/gdb/frame.h b/gdb/frame.h
index f6553fb7b6d..0f63e6eaab8 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -904,7 +904,8 @@ extern void print_stack_frame (const frame_info_ptr &, int print_level,
extern void print_frame_info (const frame_print_options &fp_opts,
const frame_info_ptr &, int print_level,
enum print_what print_what, int args,
- int set_current_sal);
+ int set_current_sal,
+ const frame_info_ptr &selected_frame);
extern frame_info_ptr block_innermost_frame (const struct block *);
diff --git a/gdb/gstack-1.in b/gdb/gstack-1.in
index 9079e70a746..e0de9729ccf 100755
--- a/gdb/gstack-1.in
+++ b/gdb/gstack-1.in
@@ -109,7 +109,7 @@ BEGIN {
attach_okay=1
}
-/^#/ {
+/^..#/ {
if (attach_okay) {
print \$0
}
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 280a08d121e..8623b9d3cfa 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -67,7 +67,7 @@ mi_apply_ext_lang_frame_filter (const frame_info_ptr &frame,
return apply_ext_lang_frame_filter (frame, flags,
(enum ext_lang_frame_args) print_values,
out,
- frame_low, frame_high);
+ frame_low, frame_high, {});
}
/* Print a list of the stack frames. Args can be none, in which case
@@ -158,7 +158,7 @@ mi_cmd_stack_list_frames (const char *command, const char *const *argv,
result = apply_ext_lang_frame_filter (get_current_frame (), flags,
NO_VALUES, current_uiout,
- py_frame_low, frame_high);
+ py_frame_low, frame_high, {});
}
/* Run the inbuilt backtrace if there are no filters registered, or
@@ -175,7 +175,7 @@ mi_cmd_stack_list_frames (const char *command, const char *const *argv,
/* Print the location and the address always, even for level 0.
If args is 0, don't print the arguments. */
print_frame_info (user_frame_print_options,
- fi, 1, LOC_AND_ADDRESS, 0 /* args */, 0);
+ fi, 1, LOC_AND_ADDRESS, 0 /* args */, 0, {});
}
}
}
@@ -762,5 +762,5 @@ mi_cmd_stack_info_frame (const char *command, const char *const *argv,
error (_("-stack-info-frame: No arguments allowed"));
print_frame_info (user_frame_print_options,
- get_selected_frame (), 1, LOC_AND_ADDRESS, 0, 1);
+ get_selected_frame (), 1, LOC_AND_ADDRESS, 0, 1, {});
}
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index f256a26807c..11463746787 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -761,7 +761,8 @@ static enum ext_lang_bt_status
py_print_frame (PyObject *filter, frame_filter_flags flags,
enum ext_lang_frame_args args_type,
struct ui_out *out, int indent,
- levels_printed_hash &levels_printed)
+ levels_printed_hash &levels_printed,
+ const frame_info_ptr &selected_frame)
{
int has_addr = 0;
CORE_ADDR address = 0;
@@ -865,6 +866,14 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
|| print_what == LOC_AND_ADDRESS
|| print_what == SHORT_LOCATION));
+ if (!selected_frame.is_null ())
+ {
+ if (frame == selected_frame)
+ out->text ("* ");
+ else
+ out->text (" ");
+ }
+
/* Print frame level. MI does not require the level if
locals/variables only are being printed. */
if (print_level
@@ -1068,7 +1077,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
enum ext_lang_bt_status success
= py_print_frame (item, flags, args_type, out, indent,
- levels_printed);
+ levels_printed, selected_frame);
if (success == EXT_LANG_BT_ERROR)
return EXT_LANG_BT_ERROR;
@@ -1142,7 +1151,8 @@ enum ext_lang_bt_status
gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
const frame_info_ptr &frame, frame_filter_flags flags,
enum ext_lang_frame_args args_type,
- struct ui_out *out, int frame_low, int frame_high)
+ struct ui_out *out, int frame_low, int frame_high,
+ const frame_info_ptr &selected_frame)
{
struct gdbarch *gdbarch = NULL;
enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
@@ -1234,7 +1244,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
try
{
success = py_print_frame (item.get (), flags, args_type, out, 0,
- levels_printed);
+ levels_printed, selected_frame);
}
catch (const gdb_exception_error &except)
{
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 4ca28bb6957..7d2d91ae9f3 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -444,7 +444,8 @@ extern enum ext_lang_bt_status gdbpy_apply_frame_filter
(const struct extension_language_defn *,
const frame_info_ptr &frame, frame_filter_flags flags,
enum ext_lang_frame_args args_type,
- struct ui_out *out, int frame_low, int frame_high);
+ struct ui_out *out, int frame_low, int frame_high,
+ const frame_info_ptr &selected_frame);
extern void gdbpy_preserve_values (const struct extension_language_defn *,
struct objfile *objfile,
copied_types_hash_t &copied_types);
diff --git a/gdb/stack.c b/gdb/stack.c
index e084976eabf..3d50a68ef50 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -227,7 +227,8 @@ static void print_frame (struct ui_out *uiout,
const frame_print_options &opts,
const frame_info_ptr &frame, int print_level,
enum print_what print_what, int print_args,
- struct symtab_and_line sal);
+ struct symtab_and_line sal,
+ const frame_info_ptr &selected_frame);
static frame_info_ptr find_frame_for_function (const char *);
static frame_info_ptr find_frame_for_address (CORE_ADDR);
@@ -362,7 +363,7 @@ print_stack_frame (const frame_info_ptr &frame, int print_level,
{
print_frame_info (user_frame_print_options,
frame, print_level, print_what, 1 /* print_args */,
- set_current_sal);
+ set_current_sal, {});
if (set_current_sal)
set_current_sal_from_frame (frame);
}
@@ -961,7 +962,7 @@ static void
do_print_frame_info (struct ui_out *uiout, const frame_print_options &fp_opts,
const frame_info_ptr &frame, int print_level,
enum print_what print_what, int print_args,
- int set_current_sal)
+ int set_current_sal, const frame_info_ptr &selected_frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
int source_print;
@@ -983,6 +984,14 @@ do_print_frame_info (struct ui_out *uiout, const frame_print_options &fp_opts,
annotate_frame_begin (print_level ? frame_relative_level (frame) : 0,
gdbarch, get_frame_pc (frame));
+ if (!selected_frame.is_null ())
+ {
+ if (frame == selected_frame)
+ uiout->text ("* ");
+ else
+ uiout->text (" ");
+ }
+
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (print_level)
@@ -1042,7 +1051,7 @@ do_print_frame_info (struct ui_out *uiout, const frame_print_options &fp_opts,
|| print_what == SHORT_LOCATION);
if (location_print || !sal.symtab)
print_frame (uiout, fp_opts, frame, print_level,
- print_what, print_args, sal);
+ print_what, print_args, sal, selected_frame);
source_print = (print_what == SRC_LINE || print_what == SRC_AND_LOC);
@@ -1129,11 +1138,11 @@ void
print_frame_info (const frame_print_options &fp_opts,
const frame_info_ptr &frame, int print_level,
enum print_what print_what, int print_args,
- int set_current_sal)
+ int set_current_sal, const frame_info_ptr &selected_frame)
{
do_with_buffered_output (do_print_frame_info, current_uiout,
fp_opts, frame, print_level, print_what,
- print_args, set_current_sal);
+ print_args, set_current_sal, selected_frame);
}
/* See stack.h. */
@@ -1263,7 +1272,8 @@ print_frame (struct ui_out *uiout,
const frame_print_options &fp_opts,
const frame_info_ptr &frame, int print_level,
enum print_what print_what, int print_args,
- struct symtab_and_line sal)
+ struct symtab_and_line sal,
+ const frame_info_ptr &selected_frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
enum language funlang = language_unknown;
@@ -1282,6 +1292,14 @@ print_frame (struct ui_out *uiout,
{
ui_out_emit_tuple tuple_emitter (uiout, "frame");
+ if (!selected_frame.is_null ())
+ {
+ if (frame == selected_frame)
+ uiout->text ("* ");
+ else
+ uiout->text (" ");
+ }
+
if (print_level)
{
uiout->text ("#");
@@ -1930,6 +1948,8 @@ backtrace_command_1 (const frame_print_options &fp_opts,
if (fp_opts.print_raw_frame_arguments)
flags |= PRINT_RAW_FRAME_ARGUMENTS;
+ frame_info_ptr selected_frame = get_selected_frame ();
+
if (!bt_opts.no_filters)
{
enum ext_lang_frame_args arg_type;
@@ -1951,7 +1971,8 @@ backtrace_command_1 (const frame_print_options &fp_opts,
result = apply_ext_lang_frame_filter (get_current_frame (), flags,
arg_type, current_uiout,
- py_start, py_end);
+ py_start, py_end,
+ selected_frame);
}
/* Run the inbuilt backtrace if there are no filters registered, or
@@ -1982,7 +2003,7 @@ backtrace_command_1 (const frame_print_options &fp_opts,
hand, perhaps the code does or could be fixed to make sure
the frame->prev field gets set to NULL in that case). */
- print_frame_info (fp_opts, fi, 1, LOCATION, 1, 0);
+ print_frame_info (fp_opts, fi, 1, LOCATION, 1, 0, selected_frame);
if ((flags & PRINT_LOCALS) != 0)
print_frame_local_vars (fi, false, NULL, NULL, 1, gdb_stdout);
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index e9fc2dca7cc..761d86214d0 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -37,7 +37,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
set opt_addr_in "($hex in)?"
gdb_test "bt" \
- [multi_line "#0 +$opt_addr_in +foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
- "#1 +$opt_addr_in +foo_o224_021\\.child1 \\(\\).*" \
- "#2 +$opt_addr_in +foo_o224_021 \\(\\).*" ]
+ [multi_line "\\* #0 +$opt_addr_in +foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
+ " #1 +$opt_addr_in +foo_o224_021\\.child1 \\(\\).*" \
+ " #2 +$opt_addr_in +foo_o224_021 \\(\\).*" ]
}
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
index 997312ee437..ae10e159a40 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
@@ -52,8 +52,8 @@ gdb_continue_to_breakpoint "entry: breakhere"
gdb_test "bt" \
[multi_line \
- "^#0 +d *\\(i=31, i@entry=30, j=31\\.5, j@entry=30\\.5\\) \[^\r\n\]*" \
- "#1 +${::hex} in main .*"] \
+ "^\\* #0 +d *\\(i=31, i@entry=30, j=31\\.5, j@entry=30\\.5\\) \[^\r\n\]*" \
+ " #1 +${::hex} in main .*"] \
"entry: bt"
gdb_test "p i" " = 31" "entry: p i"
gdb_test "p i@entry" " = 30" "entry: p i@entry"
@@ -68,8 +68,8 @@ gdb_test "p i" " = 30" "entry_locexpr: p i"
gdb_test_no_output "set variable i = 0" "entry_locexpr: set variable i = 0"
gdb_test "bt" \
[multi_line \
- "^#0 +locexpr *\\(i=0, i@entry=30\\) \[^\r\n\]*" \
- "#1 +${::hex} in main .*"] \
+ "^\\* #0 +locexpr *\\(i=0, i@entry=30\\) \[^\r\n\]*" \
+ " #1 +${::hex} in main .*"] \
"entry_locexpr: bt"
@@ -79,16 +79,16 @@ gdb_continue_to_breakpoint "entry_stack: stacktest"
gdb_test "bt" \
[multi_line \
- "^#0 +stacktest *\\(r1=r1@entry=1, r2=r2@entry=2, \[^\r\n\]+, s1=3, s1@entry=11, s2=4, s2@entry=12, \[^\r\n\]+, d9=3\\.5, d9@entry=11\\.5, da=4\\.5, da@entry=12\\.5\\) \[^\r\n\]*" \
- "#1 +${::hex} in main .*"] \
+ "^\\* #0 +stacktest *\\(r1=r1@entry=1, r2=r2@entry=2, \[^\r\n\]+, s1=3, s1@entry=11, s2=4, s2@entry=12, \[^\r\n\]+, d9=3\\.5, d9@entry=11\\.5, da=4\\.5, da@entry=12\\.5\\) \[^\r\n\]*" \
+ " #1 +${::hex} in main .*"] \
"entry_stack: bt at entry"
gdb_continue_to_breakpoint "entry_stack: breakhere_stacktest"
gdb_test "bt" \
[multi_line \
- "^#0 +stacktest *\\(r1=r1@entry=1, r2=r2@entry=2, \[^\r\n\]+, s1=3, s1@entry=11, s2=4, s2@entry=12, \[^\r\n\]+, d9=3\\.5, d9@entry=11\\.5, da=4\\.5, da@entry=12\\.5\\) \[^\r\n\]*" \
- "#1 +${::hex} in main .*"] \
+ "^\\* #0 +stacktest *\\(r1=r1@entry=1, r2=r2@entry=2, \[^\r\n\]+, s1=3, s1@entry=11, s2=4, s2@entry=12, \[^\r\n\]+, d9=3\\.5, d9@entry=11\\.5, da=4\\.5, da@entry=12\\.5\\) \[^\r\n\]*" \
+ " #1 +${::hex} in main .*"] \
"entry_stack: bt"
gdb_test "p s1" " = 3" "entry_stack: p s1"
@@ -185,13 +185,13 @@ gdb_test "frame" {\(inv=<optimized out>\).*} "entry_invalid: frame: default"
gdb_continue_to_breakpoint "entry_reference: reference"
# GCC PR debug/49980: Missing stackparam1@entry and stackparam2@entry.
-gdb_test "bt" "#0 +reference \\(regparam=regparam@entry=@${::hex}: 1, nodataparam=@${::hex}: 2, \[^\r\n\]+, stackparam1=@${::hex}: 11, stackparam2=@${::hex}: 12\\) \[^\r\n\]*\r\n#1 +${::hex} in main \\(\\) \[^\r\n\]*" \
+gdb_test "bt" "\\* #0 +reference \\(regparam=regparam@entry=@${::hex}: 1, nodataparam=@${::hex}: 2, \[^\r\n\]+, stackparam1=@${::hex}: 11, stackparam2=@${::hex}: 12\\) \[^\r\n\]*\r\n #1 +${::hex} in main \\(\\) \[^\r\n\]*" \
"entry_reference: bt at entry"
gdb_continue_to_breakpoint "entry_reference: breakhere_reference"
# GCC PR debug/49980: Missing stackparam1@entry and stackparam2@entry.
-gdb_test "bt" "#0 +reference \\(regparam=@${::hex}: 21, regparam@entry=@${::hex}: 1, nodataparam=@${::hex}: 22, \[^\r\n\]+, stackparam1=@${::hex}: 31, stackparam2=@${::hex}: 32\\) \[^\r\n\]*\r\n#1 +${::hex} in main \\(\\) \[^\r\n\]*" \
+gdb_test "bt" "\\* #0 +reference \\(regparam=@${::hex}: 21, regparam@entry=@${::hex}: 1, nodataparam=@${::hex}: 22, \[^\r\n\]+, stackparam1=@${::hex}: 31, stackparam2=@${::hex}: 32\\) \[^\r\n\]*\r\n #1 +${::hex} in main \\(\\) \[^\r\n\]*" \
"entry_reference: bt"
gdb_test "ptype regparam" " = int &" "entry_reference: ptype regparam"
@@ -218,10 +218,10 @@ gdb_continue_to_breakpoint "tailcall: breakhere"
gdb_test "bt" \
[multi_line \
- "^#0 +d *\\(i=71, i@entry=70, j=73\\.5, j@entry=72\\.5\\) \[^\r\n\]*" \
- "#1 +${::hex} in c \\(i=i@entry=7, j=j@entry=7\\.25\\) \[^\r\n\]*" \
- "#2 +${::hex} in b \\(i=i@entry=5, j=j@entry=5\\.25\\) \[^\r\n\]*" \
- "#3 +${::hex} in main \[^\r\n\]*"] \
+ "^\\* #0 +d *\\(i=71, i@entry=70, j=73\\.5, j@entry=72\\.5\\) \[^\r\n\]*" \
+ " #1 +${::hex} in c \\(i=i@entry=7, j=j@entry=7\\.25\\) \[^\r\n\]*" \
+ " #2 +${::hex} in b \\(i=i@entry=5, j=j@entry=5\\.25\\) \[^\r\n\]*" \
+ " #3 +${::hex} in main \[^\r\n\]*"] \
"tailcall: bt"
gdb_test "p i" " = 71" "tailcall: p i"
gdb_test "p i@entry" " = 70" "tailcall: p i@entry"
@@ -264,13 +264,13 @@ gdb_continue_to_breakpoint "ambiguous: breakhere"
gdb_test "bt" \
[multi_line \
- "^#0 +d \\(i=<optimized out>, j=<optimized out>\\)\[^\r\n\]*" \
- "#1 +${::hex} in amb_z \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#2 +${::hex} in amb_y \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#3 +${::hex} in amb_x \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#4 +${::hex} in amb_b \\(i=i@entry=101\\)\[^\r\n\]*" \
- "#5 +${::hex} in amb_a \\(i=i@entry=100\\)\[^\r\n\]*" \
- "#6 +${::hex} in main \\(\\)\[^\r\n\]*"] \
+ "^\\* #0 +d \\(i=<optimized out>, j=<optimized out>\\)\[^\r\n\]*" \
+ " #1 +${::hex} in amb_z \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #2 +${::hex} in amb_y \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #3 +${::hex} in amb_x \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #4 +${::hex} in amb_b \\(i=i@entry=101\\)\[^\r\n\]*" \
+ " #5 +${::hex} in amb_a \\(i=i@entry=100\\)\[^\r\n\]*" \
+ " #6 +${::hex} in main \\(\\)\[^\r\n\]*"] \
"ambiguous: bt"
@@ -281,11 +281,11 @@ gdb_continue_to_breakpoint "self: breakhere"
gdb_test "bt" \
[multi_line \
- "^#0 +d \\(i=<optimized out>, j=<optimized out>\\)\[^\r\n\]*" \
- "#1 +${::hex} in self \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#2 +${::hex} in self2 \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#3 +${::hex} in self \\(i=<optimized out>\\)\[^\r\n\]*" \
- "#4 +${::hex} in main \\(\\)\[^\r\n\]*"] \
+ "^\\* #0 +d \\(i=<optimized out>, j=<optimized out>\\)\[^\r\n\]*" \
+ " #1 +${::hex} in self \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #2 +${::hex} in self2 \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #3 +${::hex} in self \\(i=<optimized out>\\)\[^\r\n\]*" \
+ " #4 +${::hex} in main \\(\\)\[^\r\n\]*"] \
"self: bt"
gdb_test_no_output "set debug entry-values 1"
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
index a48896d60a6..45e91188e38 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
@@ -39,10 +39,10 @@ if {![runto breakpt]} {
return
}
-gdb_test "bt" "^#0 +breakpt *\\(\\) \[^\r\n\]*\r\n#1 +${::hex} in func5\[^\r\n\]*\r\n#2 +${::hex} in func4\[^\r\n\]*\r\n#3 +${::hex} in func3\[^\r\n\]*\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
+gdb_test "bt" "^\\* #0 +breakpt *\\(\\) \[^\r\n\]*\r\n #1 +${::hex} in func5\[^\r\n\]*\r\n #2 +${::hex} in func4\[^\r\n\]*\r\n #3 +${::hex} in func3\[^\r\n\]*\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
"first backtrace, with error message"
-gdb_test "bt" "^#0 +breakpt *\\(\\) \[^\r\n\]*\r\n#1 +${::hex} in func5\[^\r\n\]*\r\n#2 +${::hex} in func4\[^\r\n\]*\r\n#3 +${::hex} in func3\[^\r\n\]*\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
+gdb_test "bt" "^\\* #0 +breakpt *\\(\\) \[^\r\n\]*\r\n #1 +${::hex} in func5\[^\r\n\]*\r\n #2 +${::hex} in func4\[^\r\n\]*\r\n #3 +${::hex} in func3\[^\r\n\]*\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
"second backtrace, with error message"
clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
index d3ad91ed64f..d138dcd1a3e 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
@@ -43,10 +43,10 @@ if {![runto breakpt]} {
# Use 'bt no-filters' here as the python filters will raise their own
# error during initialisation, the no-filters case is simpler.
-gdb_test "bt no-filters" "^#0 +$hex in func2 \\(\\)\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
+gdb_test "bt no-filters" "^\\* #0 +$hex in func2 \\(\\)\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
"first backtrace, with error message"
-gdb_test "bt no-filters" "^#0 +$hex in func2 \\(\\)\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
+gdb_test "bt no-filters" "^\\* #0 +$hex in func2 \\(\\)\r\nBacktrace stopped: Cannot access memory at address ${::hex}" \
"second backtrace, with error message"
clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
index c2cffe0793b..dcf9db82c14 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
@@ -34,4 +34,4 @@ if {![runto g]} {
return
}
-gdb_test "bt" "\r\n#0 +g \\(x=x@entry=2\\) at \[^\r\n\]*\r\n#1 +${::hex} in f \\(x=x@entry=1\\) at \[^\r\n\]*\r\n#2 +${::hex} in main .*"
+gdb_test "bt" "\r\n\\* #0 +g \\(x=x@entry=2\\) at \[^\r\n\]*\r\n #1 +${::hex} in f \\(x=x@entry=1\\) at \[^\r\n\]*\r\n #2 +${::hex} in main .*"
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
index 767602805b9..e8be954ea60 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
@@ -34,4 +34,4 @@ if {![runto noret]} {
return
}
-gdb_test "bt" "#0 +noret \\(x=1\\) at \[^\r\n\]*\r\n#1 +${::hex} in mayret \\(x=x@entry=1\\) at \[^\r\n\]*\r\n#2 +${::hex} in tailcall \\(x=x@entry=1\\) at \[^\r\n\]*\r\n#3 +${::hex} in main \\(\\) at .*"
+gdb_test "bt" "\\* #0 +noret \\(x=1\\) at \[^\r\n\]*\r\n #1 +${::hex} in mayret \\(x=x@entry=1\\) at \[^\r\n\]*\r\n #2 +${::hex} in tailcall \\(x=x@entry=1\\) at \[^\r\n\]*\r\n #3 +${::hex} in main \\(\\) at .*"
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
index f1c6396d510..9b3c63d8417 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
@@ -25,4 +25,4 @@ if {![runto b]} {
return
}
-gdb_test "bt" "#0 +b \\(\\) at \[^\r\n\]*\r\n#1 +${::hex} in a \\(q=<optimized out>\\) at \[^\r\n\]*\r\n#2 +${::hex} in main \\(\[^\r\n\]*\\) at .*"
+gdb_test "bt" "\\* #0 +b \\(\\) at \[^\r\n\]*\r\n #1 +${::hex} in a \\(q=<optimized out>\\) at \[^\r\n\]*\r\n #2 +${::hex} in main \\(\[^\r\n\]*\\) at .*"
diff --git a/gdb/testsuite/gdb.arch/i386-attach-see-vdso.exp b/gdb/testsuite/gdb.arch/i386-attach-see-vdso.exp
index a53e14bf33d..782cdf1a481 100644
--- a/gdb/testsuite/gdb.arch/i386-attach-see-vdso.exp
+++ b/gdb/testsuite/gdb.arch/i386-attach-see-vdso.exp
@@ -47,7 +47,7 @@ gdb_test_multiple "attach $testpid" "attach to test process" {
# The inferior will be stopped within the vDSO, check we get symbols
# for this address.
-gdb_test "bt" "#0 *0x\[0-9a-f\]* in \[^?\]+\r\n#1\\s+.*" \
+gdb_test "bt" "\\* #0 *0x\[0-9a-f\]* in \[^?\]+\r\n #1\\s+.*" \
"backtrace decodes VDSO"
# Exit GDB and the spawned process.
diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp
index 35096076d6f..9fe7b122cdd 100644
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
@@ -34,6 +34,6 @@ clean_restart $::testfile
runto func
gdb_test "backtrace 10" \
- "#0 ($hex in )?func.*\r\n#1 <signal handler called>\r\n#2 ($hex in )?main.*"
+ "\\* #0 ($hex in )?func.*\r\n #1 <signal handler called>\r\n #2 ($hex in )?main.*"
gdb_test "finish" "Run till exit from \#0 func.*<signal handler called>"
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 35eaf26103e..2b67457ed13 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -281,7 +281,7 @@ set pat_begin \
[list \
"\r\n\032\032post-prompt\r\n" \
"\r\n\032\032frame-begin 0 $hex\r\n" \
- ".0 \r\n" \
+ "\\* #0 \r\n" \
"(" \
"\032\032frame-address\r\n" \
"${hex}( $pac)?" \
@@ -293,7 +293,7 @@ set pat_begin \
"\r\n\032\032frame-args\r\n" \
" \\(.*frame-end\r\n" \
"\r\n\032\032frame-begin 1 $hex\r\n" \
- ".1 " \
+ " #1 " \
"\r\n\032\032frame-address\r\n" \
"${hex}( $pac)?" \
"\r\n\032\032frame-address-end\r\n" \
@@ -362,7 +362,7 @@ if {[target_info exists gdb,nosignals]} {
# annotate-signal-handler-caller
#
gdb_test_multiple "backtrace" "backtrace @ signal handler" {
- -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
+ -re "frame-begin 0 $hex\r\n\\* #0.*frame-end.*frame-begin 1 $hex\r\n #1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n #2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
pass $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
index 3041632a37a..7c083ce9f26 100644
--- a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
+++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
@@ -79,7 +79,7 @@ proc_with_prefix no-cfi {} {
"Required frame unwinder may have been disabled," \
" see 'maint info frame-unwinders'"]
set hs {[^\r\n]}
- set re_bt_line "#0\\s+[string_to_regexp {callback ()}] $hs+"
+ set re_bt_line "\\* #0\\s+[string_to_regexp {callback ()}] $hs+"
set re_bt_no_filters \
[multi_line \
$re_bt_line \
@@ -117,9 +117,9 @@ proc_with_prefix cfi {} {
# #2 0x00000000004004cd in main () at ...
gdb_test "bt" \
[multi_line \
- "#0 +callback $text" \
- "#1 $text in caller $text" \
- "#2 $text in main $text"] \
+ "\\* #0 +callback $text" \
+ " #1 $text in caller $text" \
+ " #2 $text in main $text"] \
"Verify unwinding works"
}
diff --git a/gdb/testsuite/gdb.base/backtrace.exp b/gdb/testsuite/gdb.base/backtrace.exp
index 7aee6b1cebc..fbccf523c05 100644
--- a/gdb/testsuite/gdb.base/backtrace.exp
+++ b/gdb/testsuite/gdb.base/backtrace.exp
@@ -32,16 +32,16 @@ gdb_continue_to_breakpoint "Break here."
# Backtrace with the default options.
gdb_test "bt" \
[multi_line \
- "#0\[ \t\]*baz \\(\\) at \[^\r\n\]+" \
- "#1\[ \t\]*$hex in bar \\(\\) at \[^\r\n\]+" \
- "#2\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
- "#3\[ \t\]*$hex in main \\(\\) at \[^\r\n\]+" ]
+ "\\* #0\[ \t\]*baz \\(\\) at \[^\r\n\]+" \
+ " #1\[ \t\]*$hex in bar \\(\\) at \[^\r\n\]+" \
+ " #2\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
+ " #3\[ \t\]*$hex in main \\(\\) at \[^\r\n\]+" ]
# Backtrace with 'set disassemble-next-line on'. This shouldn't make
# any difference to the backtrace.
gdb_test "with disassemble-next-line on -- bt" \
[multi_line \
- "#0\[ \t\]*baz \\(\\) at \[^\r\n\]+" \
- "#1\[ \t\]*$hex in bar \\(\\) at \[^\r\n\]+" \
- "#2\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
- "#3\[ \t\]*$hex in main \\(\\) at \[^\r\n\]+" ]
+ "\\* #0\[ \t\]*baz \\(\\) at \[^\r\n\]+" \
+ " #1\[ \t\]*$hex in bar \\(\\) at \[^\r\n\]+" \
+ " #2\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
+ " #3\[ \t\]*$hex in main \\(\\) at \[^\r\n\]+" ]
diff --git a/gdb/testsuite/gdb.base/bad-frame-selection.exp b/gdb/testsuite/gdb.base/bad-frame-selection.exp
index 93949898945..f919c00063b 100644
--- a/gdb/testsuite/gdb.base/bad-frame-selection.exp
+++ b/gdb/testsuite/gdb.base/bad-frame-selection.exp
@@ -96,11 +96,11 @@ proc run_test { with_pretty_printer pop_selected } {
# Validate the stack is as expected.
gdb_test "bt" \
[multi_line \
- "#0 \[^\r\n\]*func_d \\(\\) \[^\r\n\]*" \
- "#1 \[^\r\n\]*func_c \\(\\) \[^\r\n\]*" \
- "#2 \[^\r\n\]*func_b \\(\\) \[^\r\n\]*" \
- "#3 \[^\r\n\]*func_a \\(obj=${obj_re}\\) \[^\r\n\]*" \
- "#4 \[^\r\n\]*main \[^\r\n\]*"] \
+ "\\* #0 \[^\r\n\]*func_d \\(\\) \[^\r\n\]*" \
+ " #1 \[^\r\n\]*func_c \\(\\) \[^\r\n\]*" \
+ " #2 \[^\r\n\]*func_b \\(\\) \[^\r\n\]*" \
+ " #3 \[^\r\n\]*func_a \\(obj=${obj_re}\\) \[^\r\n\]*" \
+ " #4 \[^\r\n\]*main \[^\r\n\]*"] \
"backtrace at func_d"
# Select a frame other than frame #0. The frame we select here
@@ -172,9 +172,9 @@ proc run_test { with_pretty_printer pop_selected } {
gdb_test "bt" \
[multi_line \
- "#0 \[^\r\n\]*func_b \\(\\) \[^\r\n\]*" \
- "#1 \[^\r\n\]*func_a \\(obj=${obj_re}\\) \[^\r\n\]*" \
- "#2 \[^\r\n\]*main \[^\r\n\]*"] \
+ "\\* #0 \[^\r\n\]*func_b \\(\\) \[^\r\n\]*" \
+ " #1 \[^\r\n\]*func_a \\(obj=${obj_re}\\) \[^\r\n\]*" \
+ " #2 \[^\r\n\]*main \[^\r\n\]*"] \
"backtrace at func_b after popping frames"
}
}
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 14094c72844..35e5c67cc81 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -262,7 +262,7 @@ proc test_core {file displacement} {
}
gdb_test_no_output "set verbose off"
- gdb_test "bt" "#${::decimal} +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#${::decimal} +\[^\r\n\]*\\mmain\\M.*" "core main bt"
+ gdb_test "bt" " #${::decimal} +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n #${::decimal} +\[^\r\n\]*\\mmain\\M.*" "core main bt"
}
}
@@ -313,7 +313,7 @@ proc test_attach_gdb {file pid displacement prefix} {
}
gdb_test_no_output "set verbose off"
- gdb_test "bt" "#${::decimal} +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#${::decimal} +\[^\r\n\]*\\mmain\\M.*" "attach main bt"
+ gdb_test "bt" " #${::decimal} +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n #${::decimal} +\[^\r\n\]*\\mmain\\M.*" "attach main bt"
gdb_exit
}
}
@@ -457,7 +457,7 @@ proc test_ld {file ifmain trynosym displacement} {
with_test_prefix "second backtrace" {
gdb_test_no_output "set verbose off"
- gdb_test "bt" "#0 +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#1 +\[^\r\n\]*\\mmain\\M.*" "main bt"
+ gdb_test "bt" "\\* #0 +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n #1 +\[^\r\n\]*\\mmain\\M.*" "main bt"
gdb_test_no_output "set verbose on"
}
}
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 2f5fa3d8e59..be903b9d92c 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -660,7 +660,7 @@ proc_with_prefix test_break_user_call {} {
# As long as we're stopped (breakpointed) in a called function,
# verify that we can successfully backtrace & such from here.
gdb_test "bt" \
- "#0\[ \t\]*($::hex in )?marker2.*:$::bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+ "\\* #0\[ \t\]*($::hex in )?marker2.*:$::bp_location8\r\n #1\[ \t\]*<function called from gdb>.*" \
"backtrace while in called function"
# Return from the called function. For remote targets, it's important to do
@@ -788,7 +788,7 @@ proc_with_prefix test_next_with_recursion {} {
# Do a backtrace just to confirm.
gdb_test "backtrace" \
- "#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
+ "\\* #0\[ \t\]+ factorial .value=120.*\r\n #1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
"backtrace from factorial(5.1)"
if { ![target_info exists gdb,noresults] } {
diff --git a/gdb/testsuite/gdb.base/bt-selected-frame.exp b/gdb/testsuite/gdb.base/bt-selected-frame.exp
index 0bd1024e987..5e7bb995230 100644
--- a/gdb/testsuite/gdb.base/bt-selected-frame.exp
+++ b/gdb/testsuite/gdb.base/bt-selected-frame.exp
@@ -55,15 +55,15 @@ proc check_selected_frame_after_bt { bt_cmd stack_pattern } {
check_selected_frame_after_bt "bt" \
[multi_line \
- "#0 \[^\n\r\]+" \
- "#1 \[^\n\r\]+" \
- "#2 \[^\n\r\]+"]
+ ". #0 \[^\n\r\]+" \
+ ". #1 \[^\n\r\]+" \
+ ". #2 \[^\n\r\]+"]
check_selected_frame_after_bt "bt full" \
[multi_line \
- "#0 \[^\n\r\]+" \
+ ". #0 \[^\n\r\]+" \
"No locals\." \
- "#1 \[^\n\r\]+" \
+ ". #1 \[^\n\r\]+" \
"No locals\." \
- "#2 \[^\n\r\]+" \
+ ". #2 \[^\n\r\]+" \
"No locals\."]
diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index ca466b8ff64..bb7926dad6b 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -220,15 +220,15 @@ gdb_test "backtrace" ".*arg0_128 \\(arg0=0.1, arg1=1.0, arg2=2.0, arg3=3.0, arg4
# Test calling inferior function with DFP arguments or return value.
gdb_test "call arg0_32 (1.2df, 2.2df, 3.2df, 4.2df, 5.2df, 6.2df)" "Breakpoint.*arg0_32.*" "call function with correct _Decimal32 arguments."
-gdb_test "backtrace 1" "\n#${::decimal} arg0_32 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal32 arguments."
+gdb_test "backtrace 1" "\n\\* #${::decimal} arg0_32 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal32 arguments."
gdb_test "finish" " = 1.2" "correct _Decimal32 return value from called function."
gdb_test "call arg0_64 (1.2dd, 2.2dd, 3.2dd, 4.2dd, 5.2dd, 6.2dd)" "Breakpoint.*arg0_64.*" "call function with correct _Decimal64 arguments."
-gdb_test "backtrace 1" "\n#${::decimal} arg0_64 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal64 arguments."
+gdb_test "backtrace 1" "\n\\* #${::decimal} arg0_64 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal64 arguments."
gdb_test "finish" " = 1.2" "correct _Decimal64 return value from called function."
gdb_test "call arg0_128 (1.2dl, 2.2dl, 3.2dl, 4.2dl, 5.2dl, 6.2dl)" "Breakpoint.*arg0_128.*" "call function with correct _Decimal128 arguments."
-gdb_test "backtrace 1" "\n#${::decimal} arg0_128 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal128 arguments."
+gdb_test "backtrace 1" "\n\\* #${::decimal} arg0_128 \\(arg0=1.2, arg1=2.2, arg2=3.2, arg3=4.2, arg4=5.2, arg5=6.2\\).*" "backtrace function with correct _Decimal128 arguments."
gdb_test "finish" " = 1.2" "correct _Decimal128 return value from called function."
gdb_test "call decimal_dec128_align (double_val1, dec128_val2, double_val3, double_val4, double_val5, double_val6, double_val7, double_val8, double_val9, double_val10, double_val11, double_val12, double_val13, double_val14)" " = 1" \
diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp
index 98415a5551c..222af371913 100644
--- a/gdb/testsuite/gdb.base/frame-args.exp
+++ b/gdb/testsuite/gdb.base/frame-args.exp
@@ -111,6 +111,6 @@ gdb_test "backtrace -frame-info source-and-location 2" \
[multi_line \
".*" \
".*" \
- "#1 call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
+ "\\* #1 call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
"$positive\[ \t\]*break_me \\(\\);.*"] \
"backtrace -frame-info source-and-location 2 overriding print frame-info set to source-line"
diff --git a/gdb/testsuite/gdb.base/frame-selection.exp b/gdb/testsuite/gdb.base/frame-selection.exp
index b3fb5e13d25..a6edc5065fa 100644
--- a/gdb/testsuite/gdb.base/frame-selection.exp
+++ b/gdb/testsuite/gdb.base/frame-selection.exp
@@ -197,9 +197,9 @@ with_test_prefix "stack with tail call" {
gdb_test "bt" \
[multi_line \
- "#0 func_that_never_returns \\(\\) at \[^\r\n\]+" \
- "#1 $hex in func_that_tail_calls \\(\\) at \[^\r\n\]+" \
- "#2 $hex in main \\(\\) at \[^\r\n\]+"] \
+ "\\* #0 func_that_never_returns \\(\\) at \[^\r\n\]+" \
+ " #1 $hex in func_that_tail_calls \\(\\) at \[^\r\n\]+" \
+ " #2 $hex in main \\(\\) at \[^\r\n\]+"] \
"bt from func_that_never_returns"
# Reset the frame addresses based on the new stack.
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index fdfdf07b78c..2a86e048dd2 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -452,9 +452,9 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6b
gdb_test_sequence "backtrace 100" "backtrace from call6b" {
- "\[\r\n\]#0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* main \\(.*\\) at "
}
# Continue; should stop at call6c and print actual arguments.
@@ -463,10 +463,10 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6c
gdb_test_sequence "backtrace 100" "backtrace from call6c" {
- "\[\r\n\]#0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* main \\(.*\\) at "
}
# Continue; should stop at call6d and print actual arguments.
@@ -475,11 +475,11 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6d
gdb_test_sequence "backtrace 100" "backtrace from call6d" {
- "\[\r\n\]#0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* main \\(.*\\) at "
}
# Continue; should stop at call6e and print actual arguments.
@@ -488,12 +488,12 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6e
gdb_test_sequence "backtrace 100" "backtrace from call6e" {
- "\[\r\n\]#0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* main \\(.*\\) at "
}
# Continue; should stop at call6f and print actual arguments.
@@ -502,13 +502,13 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6f
gdb_test_sequence "backtrace 100" "backtrace from call6f" {
- "\[\r\n\]#0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* main \\(.*\\) at "
}
# Continue; should stop at call6g and print actual arguments.
@@ -517,14 +517,14 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6g
gdb_test_sequence "backtrace 100" "backtrace from call6g" {
- "\[\r\n\]#0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#7 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #7 .* main \\(.*\\) at "
}
# Continue; should stop at call6h and print actual arguments.
@@ -533,15 +533,15 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6h
gdb_test_sequence "backtrace 100" "backtrace from call6h" {
- "\[\r\n\]#0 .* call6h \\(us=6, ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#7 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#8 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6h \\(us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #7 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #8 .* main \\(.*\\) at "
}
# monitor only allows 8 breakpoints; w89k board allows 10, so
@@ -557,16 +557,16 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6i
gdb_test_sequence "backtrace 100" "backtrace from call6i" {
- "\[\r\n\]#0 .* call6i \\(ui=7, ul=8\\) "
- "\[\r\n\]#1 .* call6h \\(us=6, ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#7 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#8 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#9 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6i \\(ui=7, ul=8\\) "
+ "\[\r\n\] #1 .* call6h \\(us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #7 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #8 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #9 .* main \\(.*\\) at "
}
# Continue; should stop at call6j and print actual arguments.
@@ -575,17 +575,17 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6j
gdb_test_sequence "backtrace 100" "backtrace from call6j" {
- "\[\r\n\]#0 .* call6j \\(ul=8\\) "
- "\[\r\n\]#1 .* call6i \\(ui=7, ul=8\\) "
- "\[\r\n\]#2 .* call6h \\(us=6, ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#7 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#8 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#9 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#10 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6j \\(ul=8\\) "
+ "\[\r\n\] #1 .* call6i \\(ui=7, ul=8\\) "
+ "\[\r\n\] #2 .* call6h \\(us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #7 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #8 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #9 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #10 .* main \\(.*\\) at "
}
# Continue; should stop at call6k and print actual arguments.
@@ -593,18 +593,18 @@ proc_with_prefix discard_and_shuffle {} {
gdb_continue call6k
gdb_test_sequence "backtrace 100" "backtrace from call6k" {
- "\[\r\n\]#0 .* call6k \\(\\) "
- "\[\r\n\]#1 .* call6j \\(ul=8\\) "
- "\[\r\n\]#2 .* call6i \\(ui=7, ul=8\\) "
- "\[\r\n\]#3 .* call6h \\(us=6, ui=7, ul=8\\) "
- "\[\r\n\]#4 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#5 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#6 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#7 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#8 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#9 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#10 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
- "\[\r\n\]#11 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call6k \\(\\) "
+ "\[\r\n\] #1 .* call6j \\(ul=8\\) "
+ "\[\r\n\] #2 .* call6i \\(ui=7, ul=8\\) "
+ "\[\r\n\] #3 .* call6h \\(us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #4 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #5 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #6 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #7 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #8 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #9 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #10 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+ "\[\r\n\] #11 .* main \\(.*\\) at "
}
}
@@ -655,9 +655,9 @@ proc_with_prefix shuffle_round_robin {} {
if {$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test_sequence "backtrace 100" "backtrace from call7b" {
- "\[\r\n\]#0 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#1 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#2 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #1 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #2 .* main \\(.*\\) at "
}
# Continue; should stop at call7c and print actual arguments.
@@ -666,10 +666,10 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7c
gdb_test_sequence "backtrace 100" "backtrace from call7c" {
- "\[\r\n\]#0 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#1 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#2 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#3 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #1 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #2 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #3 .* main \\(.*\\) at "
}
# Continue; should stop at call7d and print actual arguments.
@@ -678,22 +678,22 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7d
gdb_test_sequence "backtrace 100" "backtrace from call7d" {
- "\[\r\n\]#0 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#1 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#2 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#3 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#4 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #1 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #2 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #3 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #4 .* main \\(.*\\) at "
}
gdb_continue call7e
gdb_test_sequence "backtrace 100" "backtrace from call7e" {
- "\[\r\n\]#0 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#1 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#2 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#3 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#4 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#5 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #1 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #2 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #3 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #4 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #5 .* main \\(.*\\) at "
}
# Continue; should stop at call7f and print actual arguments.
@@ -702,13 +702,13 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7f
gdb_test_sequence "backtrace 100" "backtrace from call7f" {
- "\[\r\n\]#0 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#1 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#2 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#3 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#4 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#5 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#6 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #1 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #2 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #3 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #4 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #5 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #6 .* main \\(.*\\) at "
}
# Continue; should stop at call7g and print actual arguments.
@@ -717,28 +717,28 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7g
gdb_test_sequence "backtrace 100" "backtrace from call7g" {
- "\[\r\n\]#0 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
- "\[\r\n\]#1 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#2 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#3 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#4 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#5 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#6 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#7 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+ "\[\r\n\] #1 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #2 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #3 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #4 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #5 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #6 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #7 .* main \\(.*\\) at "
}
gdb_continue call7h
gdb_test_sequence "backtrace 100" "backtrace from call7h" {
- "\[\r\n\]#0 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
- "\[\r\n\]#1 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
- "\[\r\n\]#2 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#3 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#4 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#5 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#6 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#7 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#8 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+ "\[\r\n\] #1 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+ "\[\r\n\] #2 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #3 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #4 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #5 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #6 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #7 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #8 .* main \\(.*\\) at "
}
# monitor only allows 8 breakpoints; w89k board allows 10, so
@@ -754,16 +754,16 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7i
gdb_test_sequence "backtrace 100" "backtrace from call7i" {
- "\[\r\n\]#0 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
- "\[\r\n\]#1 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
- "\[\r\n\]#2 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
- "\[\r\n\]#3 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#4 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#5 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#6 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#7 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#8 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#9 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+ "\[\r\n\] #1 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+ "\[\r\n\] #2 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+ "\[\r\n\] #3 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #4 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #5 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #6 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #7 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #8 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #9 .* main \\(.*\\) at "
}
# Continue; should stop at call7j and print actual arguments.
@@ -772,17 +772,17 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7j
gdb_test_sequence "backtrace 100" "backtrace from call7j" {
- "\[\r\n\]#0 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
- "\[\r\n\]#1 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
- "\[\r\n\]#2 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
- "\[\r\n\]#3 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
- "\[\r\n\]#4 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#5 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#6 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#7 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#8 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#9 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#10 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
+ "\[\r\n\] #1 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+ "\[\r\n\] #2 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+ "\[\r\n\] #3 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+ "\[\r\n\] #4 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #5 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #6 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #7 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #8 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #9 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #10 .* main \\(.*\\) at "
}
# Continue; should stop at call7k and print actual arguments.
@@ -791,18 +791,18 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7k
gdb_test_sequence "backtrace 100" "backtrace from call7k" {
- "\[\r\n\]#0 .* call7k \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#1 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
- "\[\r\n\]#2 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
- "\[\r\n\]#3 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
- "\[\r\n\]#4 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
- "\[\r\n\]#5 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
- "\[\r\n\]#6 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
- "\[\r\n\]#7 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
- "\[\r\n\]#8 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
- "\[\r\n\]#9 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
- "\[\r\n\]#10 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
- "\[\r\n\]#11 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* call7k \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #1 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
+ "\[\r\n\] #2 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+ "\[\r\n\] #3 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+ "\[\r\n\] #4 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+ "\[\r\n\] #5 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+ "\[\r\n\] #6 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+ "\[\r\n\] #7 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+ "\[\r\n\] #8 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+ "\[\r\n\] #9 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+ "\[\r\n\] #10 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+ "\[\r\n\] #11 .* main \\(.*\\) at "
}
}
@@ -826,14 +826,14 @@ proc_with_prefix recursive_structs_by_value {} {
gdb_test "" "Breakpoint $decimal, hitbottom .*" "run to hitbottom"
gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
- "\[\r\n\]#0 .* hitbottom \\(\\) "
- "\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
- "\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
- "\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
- "\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
- "\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
- "\[\r\n\]#6 .* test_struct_args \\(\\) "
- "\[\r\n\]#7 .* main \\(.*\\) at "
+ "\[\r\n\]\\* #0 .* hitbottom \\(\\) "
+ "\[\r\n\] #1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
+ "\[\r\n\] #2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
+ "\[\r\n\] #3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
+ "\[\r\n\] #4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
+ "\[\r\n\] #5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
+ "\[\r\n\] #6 .* test_struct_args \\(\\) "
+ "\[\r\n\] #7 .* main \\(.*\\) at "
}
}
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 243e0b39082..ce5515721a7 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -67,15 +67,15 @@ if { $core_loaded == -1 } {
}
gdb_test_sequence "where" "where in corefile" {
- "\[\r\n\]+#0 .* terminal_func \\(\\) at "
- "\[\r\n\]+#1 .* array_func \\(\\) at "
- "\[\r\n\]+#2 .* factorial_func \\(value=1\\) at "
- "\[\r\n\]+#3 .* factorial_func \\(value=2\\) at "
- "\[\r\n\]+#4 .* factorial_func \\(value=3\\) at "
- "\[\r\n\]+#5 .* factorial_func \\(value=4\\) at "
- "\[\r\n\]+#6 .* factorial_func \\(value=5\\) at "
- "\[\r\n\]+#7 .* factorial_func \\(value=6\\) at "
- "\[\r\n\]+#8 .* main \\(.*\\) at "
+ "\[\r\n\]+\\* #0 .* terminal_func \\(\\) at "
+ "\[\r\n\]+ #1 .* array_func \\(\\) at "
+ "\[\r\n\]+ #2 .* factorial_func \\(value=1\\) at "
+ "\[\r\n\]+ #3 .* factorial_func \\(value=2\\) at "
+ "\[\r\n\]+ #4 .* factorial_func \\(value=3\\) at "
+ "\[\r\n\]+ #5 .* factorial_func \\(value=4\\) at "
+ "\[\r\n\]+ #6 .* factorial_func \\(value=5\\) at "
+ "\[\r\n\]+ #7 .* factorial_func \\(value=6\\) at "
+ "\[\r\n\]+ #8 .* main \\(.*\\) at "
}
set post_corefile_regs [capture_command_output "info registers" ""]
diff --git a/gdb/testsuite/gdb.base/gdb1250.exp b/gdb/testsuite/gdb.base/gdb1250.exp
index 2ba25499daa..1f3629f7e71 100644
--- a/gdb/testsuite/gdb.base/gdb1250.exp
+++ b/gdb/testsuite/gdb.base/gdb1250.exp
@@ -50,10 +50,10 @@ if {![runto abort -allow-pending]} {
# breakpoints should work.
gdb_test_multiple "backtrace" "backtrace from abort" {
- -re "#0.*abort.*\r\n#1.*beta.*\r\n#2.*alpha.*\r\n#3.*main.*\r\n$gdb_prompt $" {
+ -re "\\* #0.*abort.*\r\n #1.*beta.*\r\n #2.*alpha.*\r\n #3.*main.*\r\n$gdb_prompt $" {
pass "backtrace from abort"
}
- -re "#0.*abort.*\r\n#1.*beta.*\r\n$gdb_prompt $" {
+ -re "\\* #0.*abort.*\r\n #1.*beta.*\r\n$gdb_prompt $" {
# This happens with gdb HEAD as of 2003-07-13, with gcc 3.3,
# binutils 2.14, either -gdwarf-2 or -gstabs+, on native
# i686-pc-linux-gnu.
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
index bc524215d50..ec559918071 100644
--- a/gdb/testsuite/gdb.base/gstack.exp
+++ b/gdb/testsuite/gdb.base/gstack.exp
@@ -65,7 +65,7 @@ set no_awk false
set location_re ${srcfile}:${decimal}
gdb_expect {
- -i "$res" -re "#0 +(${::hex} in )?main \(\).*$location_re.*\r\nGSTACK-END\r\n\$" {
+ -i "$res" -re "\\* #0 +(${::hex} in )?main \(\).*$location_re.*\r\nGSTACK-END\r\n\$" {
set saw_backtrace true
pass $test
exp_continue
diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp
index f090aeefee9..243f24f2c32 100644
--- a/gdb/testsuite/gdb.base/hbreak2.exp
+++ b/gdb/testsuite/gdb.base/hbreak2.exp
@@ -404,7 +404,7 @@ gdb_test "print marker2(99)" \
# As long as we're stopped (breakpointed) in a called function,
# verify that we can successfully backtrace & such from here.
gdb_test "bt" \
- "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+ "\\* #0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n #1\[ \t\]*<function called from gdb>.*" \
"backtrace while in called function"
# Return from the called function. For remote targets, it's important to do
@@ -459,7 +459,7 @@ proc test_next_with_recursion {} {
# Do a backtrace just to confirm how many levels deep we are.
gdb_test "backtrace" \
- "#0\[ \t\]+ factorial .value=5..*" \
+ "\\* #0\[ \t\]+ factorial .value=5..*" \
"backtrace from factorial(5)"
# Now a "next" should position us at the recursive call, which
@@ -500,7 +500,7 @@ proc test_next_with_recursion {} {
# Do a backtrace just to confirm.
gdb_test "backtrace" \
- "#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
+ "\\* #0\[ \t\]+ factorial .value=120.*\r\n #1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
"backtrace from factorial(5.1)"
if { ![target_info exists gdb,noresults] } {
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index 3a378cd6960..7e57760066f 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -81,13 +81,13 @@ foreach bt_cmd { "bt" "bt -no-filters" } {
# Check the unbroken stack.
gdb_test_sequence "$bt_cmd" "backtrace when the unwind is left unbroken" {
- "\\r\\n#0 \[^\r\n\]* inline_func \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* normal_func \\(\\) at "
- "\\r\\n#2 \[^\r\n\]* inline_func \\(\\) at "
- "\\r\\n#3 \[^\r\n\]* normal_func \\(\\) at "
- "\\r\\n#4 \[^\r\n\]* inline_func \\(\\) at "
- "\\r\\n#5 \[^\r\n\]* normal_func \\(\\) at "
- "\\r\\n#6 \[^\r\n\]* main \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* inline_func \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* normal_func \\(\\) at "
+ "\\r\\n #2 \[^\r\n\]* inline_func \\(\\) at "
+ "\\r\\n #3 \[^\r\n\]* normal_func \\(\\) at "
+ "\\r\\n #4 \[^\r\n\]* inline_func \\(\\) at "
+ "\\r\\n #5 \[^\r\n\]* normal_func \\(\\) at "
+ "\\r\\n #6 \[^\r\n\]* main \\(\\) at "
}
with_test_prefix "cycle at level 5" {
@@ -97,12 +97,12 @@ foreach bt_cmd { "bt" "bt -no-filters" } {
"Register cache flushed\\."
gdb_test_lines "$bt_cmd" "backtrace when the unwind is broken at frame 5" \
[multi_line \
- "#0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
- "#2 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#3 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
- "#4 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#5 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ "\\* #0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ " #2 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #3 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ " #4 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #5 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
"Backtrace stopped: previous frame identical to this frame \\(corrupt stack\\?\\)"]
}
@@ -113,10 +113,10 @@ foreach bt_cmd { "bt" "bt -no-filters" } {
"Register cache flushed\\."
gdb_test_lines "$bt_cmd" "backtrace when the unwind is broken at frame 3" \
[multi_line \
- "#0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
- "#2 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#3 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ "\\* #0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ " #2 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #3 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
"Backtrace stopped: previous frame identical to this frame \\(corrupt stack\\?\\)"]
}
@@ -127,8 +127,8 @@ foreach bt_cmd { "bt" "bt -no-filters" } {
"Register cache flushed\\."
gdb_test_lines "$bt_cmd" "backtrace when the unwind is broken at frame 1" \
[multi_line \
- "#0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
- "#1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
+ "\\* #0 \[^\r\n\]* inline_func \\(\\) at \[^\r\n\]+" \
+ " #1 \[^\r\n\]* normal_func \\(\\) at \[^\r\n\]+" \
"Backtrace stopped: previous frame identical to this frame \\(corrupt stack\\?\\)"]
}
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 0b5a6caead8..5504d0cf61c 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -124,8 +124,8 @@ proc jit_reader_test {} {
with_test_prefix "before mangling" {
gdb_test "bt" \
[multi_line \
- "#0 ${any} in jit_function_stack_mangle ${any}" \
- "#1 ${any} in main ${any}" \
+ "\\* #0 ${any} in jit_function_stack_mangle ${any}" \
+ " #1 ${any} in main ${any}" \
] \
"bt works"
@@ -156,8 +156,8 @@ proc jit_reader_test {} {
# the mangled stack pointer.
gdb_test "bt" \
[multi_line \
- "#0 ${any} in jit_function_stack_mangle ${any}" \
- "#1 ${any} in main ${any}" \
+ "\\* #0 ${any} in jit_function_stack_mangle ${any}" \
+ " #1 ${any} in main ${any}" \
] \
"bt works"
@@ -284,8 +284,8 @@ proc jit_reader_test {} {
# the mangled stack pointer.
gdb_test "bt" \
[multi_line \
- "#0 ${any} in jit_function_stack_mangle ${any}" \
- "#1 ${any} in main ${any}" \
+ "\\* #0 ${any} in jit_function_stack_mangle ${any}" \
+ " #1 ${any} in main ${any}" \
]
}
@@ -306,8 +306,8 @@ proc jit_reader_test {} {
gdb_test "cont" ".*Temporary breakpoint ${any} in jit_function_add .*"
gdb_test "bt" \
[multi_line \
- "#0 ${any} in jit_function_add ${any}" \
- "#1 ${any} in main ${any}" \
+ "\\* #0 ${any} in jit_function_add ${any}" \
+ " #1 ${any} in main ${any}" \
]
}
}
diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp
index b9a4dc0d9ec..3349ae32d97 100644
--- a/gdb/testsuite/gdb.base/large-frame.exp
+++ b/gdb/testsuite/gdb.base/large-frame.exp
@@ -47,9 +47,9 @@ proc run_test { opt_level } {
gdb_continue_to_breakpoint "blah"
gdb_test "backtrace" [multi_line \
- "#0 blah \[^\n\r\]+" \
- "#1 $hex in func \[^\n\r\]+" \
- "#2 $hex in main \[^\n\r\]+"]
+ "\\* #0 blah \[^\n\r\]+" \
+ " #1 $hex in func \[^\n\r\]+" \
+ " #2 $hex in main \[^\n\r\]+"]
}
foreach opt { O0 O1 O2 } {
diff --git a/gdb/testsuite/gdb.base/pc-not-saved.exp b/gdb/testsuite/gdb.base/pc-not-saved.exp
index 98cedb9b5e4..d70f7260d90 100644
--- a/gdb/testsuite/gdb.base/pc-not-saved.exp
+++ b/gdb/testsuite/gdb.base/pc-not-saved.exp
@@ -76,7 +76,7 @@ if { ![runto "break_bt_here"] } {
# backtrace is that the previous $pc is not available.
gdb_test "bt" \
[multi_line \
- "^#0 break_bt_here \\(\\) at \[^\r\n\]+" \
+ "^\\* #0 break_bt_here \\(\\) at \[^\r\n\]+" \
"Backtrace stopped: frame did not save the PC"] \
"backtrace from break_bt_here function"
@@ -108,7 +108,7 @@ gdb_continue_to_breakpoint "continue to other_func"
# backtrace is that the previous $pc is not available.
gdb_test "bt" \
[multi_line \
- "#0 other_func \\(\\) at \[^\r\n\]+" \
- "#1 (:?$hex in )?break_bt_here \\(\\) at \[^\r\n\]+" \
+ "\\* #0 other_func \\(\\) at \[^\r\n\]+" \
+ " #1 (:?$hex in )?break_bt_here \\(\\) at \[^\r\n\]+" \
"Backtrace stopped: frame did not save the PC"] \
"backtrace from other_func function"
diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index bba1186a344..2b48410c930 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -42,10 +42,10 @@ gdb_test "continue" \
"Breakpoint $decimal, $hex in fun_three \\(\\)"
gdb_test "backtrace" \
- [multi_line "#0 $hex in fun_three \\(\\)" \
- "#1 $hex in fun_two \\(\\)" \
- "#2 $hex in fun_one \\(\\)" \
- "#3 $hex in main \\(\\)" ]
+ [multi_line "\\* #0 $hex in fun_three \\(\\)" \
+ " #1 $hex in fun_two \\(\\)" \
+ " #2 $hex in fun_one \\(\\)" \
+ " #3 $hex in main \\(\\)" ]
gdb_test_no_output "maint info symtabs" \
"maint info symtabs no output for --readnever"
diff --git a/gdb/testsuite/gdb.base/recpar.exp b/gdb/testsuite/gdb.base/recpar.exp
index 3812884dc46..7a6c9a7dd91 100644
--- a/gdb/testsuite/gdb.base/recpar.exp
+++ b/gdb/testsuite/gdb.base/recpar.exp
@@ -30,7 +30,7 @@ gdb_test "continue" \
"Breakpoint .* foo \\(n=3\\) at .*$srcfile:$decimal.*"
gdb_test "backtrace" \
- "#0 +foo \\(n=3\\).*\r\n#1.* foo \\(n=4\\).*\r\n#2.* foo \\(n=5\\).*#3.* main \\(\\).*"
+ "\\* #0 +foo \\(n=3\\).*\r\n #1.* foo \\(n=4\\).*\r\n #2.* foo \\(n=5\\).* #3.* main \\(\\).*"
gdb_test "frame 2" \
"#2 .* foo \\(n=5\\) .*"
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 1ada019ea43..8e07cac3ad2 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -431,7 +431,7 @@ gdb_test "print marker2(99)" \
# verify that we can successfully backtrace & such from here.
gdb_test "bt" \
- "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
+ "\\* #0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n #1\[ \t\]*<function called from gdb>.*" \
"backtrace while in called function"
# Return from the called function. For remote targets, it's important to do
@@ -502,7 +502,7 @@ proc test_next_with_recursion {} {
# Do a backtrace just to confirm how many levels deep we are.
gdb_test "backtrace" \
- "#0\[ \t\]+ factorial .value=5..*" \
+ "\\* #0\[ \t\]+ factorial .value=5..*" \
"backtrace from factorial(5)"
# Now a "next" should position us at the recursive call, which
@@ -543,7 +543,7 @@ proc test_next_with_recursion {} {
# Do a backtrace just to confirm.
gdb_test "backtrace" \
- "#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
+ "\\* #0\[ \t\]+ factorial .value=120.*\r\n #1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
"backtrace from factorial(5.1)"
if { ![target_info exists gdb,noresults] } {
diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp
index c9105342fa2..3c47f1a273d 100644
--- a/gdb/testsuite/gdb.base/sigaltstack.exp
+++ b/gdb/testsuite/gdb.base/sigaltstack.exp
@@ -49,14 +49,14 @@ gdb_test "next"
# Full backtrace?
gdb_test_sequence "bt" "backtrace" {
- "\[\r\n\]+.0 \[^\r\n\]* catcher "
- "\[\r\n\]+.1 .signal handler called."
- "\[\r\n\]+.2 \[^\r\n\]* thrower .next_level=INNER"
- "\[\r\n\]+.3 \[^\r\n\]* catcher "
- "\[\r\n\]+.4 .signal handler called."
- "\[\r\n\]+.5 \[^\r\n\]* thrower .next_level=OUTER"
- "\[\r\n\]+.6 \[^\r\n\]* catcher "
- "\[\r\n\]+.7 \[^\r\n\]* main "
+ "\[\r\n\]+\\* #0 \[^\r\n\]* catcher "
+ "\[\r\n\]+ #1 .signal handler called."
+ "\[\r\n\]+ #2 \[^\r\n\]* thrower .next_level=INNER"
+ "\[\r\n\]+ #3 \[^\r\n\]* catcher "
+ "\[\r\n\]+ #4 .signal handler called."
+ "\[\r\n\]+ #5 \[^\r\n\]* thrower .next_level=OUTER"
+ "\[\r\n\]+ #6 \[^\r\n\]* catcher "
+ "\[\r\n\]+ #7 \[^\r\n\]* main "
}
proc finish_test { pattern msg } {
diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp
index 21de03ed3f1..59086328945 100644
--- a/gdb/testsuite/gdb.base/siginfo.exp
+++ b/gdb/testsuite/gdb.base/siginfo.exp
@@ -48,9 +48,9 @@ if {![runto_main]} {
gdb_test "break handler"
gdb_test "continue" ".* handler .*" "continue to stepi handler"
gdb_test_sequence "bt" "backtrace for nexti" {
- "\[\r\n\]+.0 \[^\r\n\]* handler "
- "\[\r\n\]+.1 .signal handler called."
- "\[\r\n\]+.2 \[^\r\n\]* main "
+ "\[\r\n\]+\\* #0 \[^\r\n\]* handler "
+ "\[\r\n\]+ #1 .signal handler called."
+ "\[\r\n\]+ #2 \[^\r\n\]* main "
}
# Check that GDB can step the inferior back to main
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
index 920a4ec851d..33a43fc96b7 100644
--- a/gdb/testsuite/gdb.base/sigstep.exp
+++ b/gdb/testsuite/gdb.base/sigstep.exp
@@ -59,9 +59,9 @@ proc validate_backtrace {} {
gdb_test "break handler"
gdb_test "continue" ".* handler .*" "continue to stepi handler"
gdb_test_sequence "bt" "backtrace for nexti" {
- "\[\r\n\]+.0 \[^\r\n\]* handler "
- "\[\r\n\]+.1 .signal handler called."
- "\[\r\n\]+.2 \[^\r\n\]* main "
+ "\[\r\n\]+\\* #0 \[^\r\n\]* handler "
+ "\[\r\n\]+ #1 .signal handler called."
+ "\[\r\n\]+ #2 \[^\r\n\]* main "
}
}
}
@@ -448,9 +448,9 @@ proc breakpoint_to_handler { displaced cmd } {
# Make sure we the displaced stepping scratch pad isn't in the
# backtrace.
gdb_test_sequence "bt" "backtrace" {
- "\[\r\n\]+.0 \[^\r\n\]* handler "
- "\[\r\n\]+.1 .signal handler called."
- "\[\r\n\]+.2 \[^\r\n\]* main "
+ "\[\r\n\]+\\* #0 \[^\r\n\]* handler "
+ "\[\r\n\]+ #1 .signal handler called."
+ "\[\r\n\]+ #2 \[^\r\n\]* main "
}
}
}
@@ -502,9 +502,9 @@ proc breakpoint_to_handler_entry { displaced cmd } {
# Make sure we the displaced stepping scratch pad isn't in the
# backtrace.
gdb_test_sequence "bt" "backtrace" {
- "\[\r\n\]+.0 \[^\r\n\]* handler "
- "\[\r\n\]+.1 .signal handler called."
- "\[\r\n\]+.2 \[^\r\n\]* main "
+ "\[\r\n\]+\\* #0 \[^\r\n\]* handler "
+ "\[\r\n\]+ #1 .signal handler called."
+ "\[\r\n\]+ #2 \[^\r\n\]* main "
}
}
}
diff --git a/gdb/testsuite/gdb.base/tailcall-msym.exp b/gdb/testsuite/gdb.base/tailcall-msym.exp
index d6cd06f88cd..4a8e254f5fd 100644
--- a/gdb/testsuite/gdb.base/tailcall-msym.exp
+++ b/gdb/testsuite/gdb.base/tailcall-msym.exp
@@ -140,9 +140,9 @@ if {![runto callee]} {
# frame.
gdb_test "bt" \
[multi_line \
- "#0\[^\r\n\]+callee \\(\\)" \
- "#1\[^\r\n\]+caller \\(\\)" \
- "#2\[^\r\n\]+main \\(\\)"] \
+ "\\* #0\[^\r\n\]+callee \\(\\)" \
+ " #1\[^\r\n\]+caller \\(\\)" \
+ " #2\[^\r\n\]+main \\(\\)"] \
"backtrace shows correct caller, not dummy_func"
# Test that 'info frame' displays the correct function name. Also
diff --git a/gdb/testsuite/gdb.base/until-in-tailcall.exp b/gdb/testsuite/gdb.base/until-in-tailcall.exp
index cd66d0ceaf8..208aa6435cc 100644
--- a/gdb/testsuite/gdb.base/until-in-tailcall.exp
+++ b/gdb/testsuite/gdb.base/until-in-tailcall.exp
@@ -62,9 +62,9 @@ proc run_test { use_parent_frame_p } {
# Check the stack looks correct.
gdb_test "bt" \
[multi_line \
- "#0\\s+normal_function\[^\r\n\]+" \
- "#1\\s+(?:$::hex in )?tailcall_function\[^\r\n\]+" \
- "#2\\s+(?:$::hex in )?main\[^\r\n\]+"] \
+ "\\* #0\\s+normal_function\[^\r\n\]+" \
+ " #1\\s+(?:$::hex in )?tailcall_function\[^\r\n\]+" \
+ " #2\\s+(?:$::hex in )?main\[^\r\n\]+"] \
"check call stack"
# Move up to tailcall_function if needed.
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
index ed7bf83752f..7d994144530 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
@@ -99,7 +99,7 @@ proc do_test { function step_cmd } {
"check frame-id matches"
# Check that the previous frame is 'main'.
- gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?"
+ gdb_test "bt 2" "\r\n #1\\s+\[^\r\n\]+ in main \\(\\)( .*)?"
# Move up the stack (to main).
gdb_test "up" \
diff --git a/gdb/testsuite/gdb.btrace/record_goto.exp b/gdb/testsuite/gdb.btrace/record_goto.exp
index 1c8898bdf68..9b24b0dfa66 100644
--- a/gdb/testsuite/gdb.btrace/record_goto.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto.exp
@@ -106,9 +106,9 @@ gdb_test "record goto 27" ".*fun3 \\(\\) at ${optional_filepath}record_goto.c:35
# check the back trace at that location
gdb_test "backtrace" [multi_line \
- "#0.*fun3.*at ${optional_filepath}record_goto.c:35.*" \
- "#1.*fun4.*at ${optional_filepath}record_goto.c:43.*" \
- "#2.*main.*at ${optional_filepath}record_goto.c:49.*" \
+ "\\* #0.*fun3.*at ${optional_filepath}record_goto.c:35.*" \
+ " #1.*fun4.*at ${optional_filepath}record_goto.c:43.*" \
+ " #2.*main.*at ${optional_filepath}record_goto.c:49.*" \
"Backtrace stopped: not enough registers or memory available to unwind further" \
]
diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp
index 4a940c1d9e7..887bcddbda1 100644
--- a/gdb/testsuite/gdb.btrace/tailcall.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall.exp
@@ -82,9 +82,9 @@ gdb_test "record goto 4" ".*bar \\(\\) at ${optional_filepath}tailcall.c:24\r\n.
# check the backtrace
gdb_test "backtrace" [multi_line \
- "#0.*bar \\(\\) at ${optional_filepath}tailcall.c:24" \
- "#1.*foo \\(\\) at ${optional_filepath}tailcall.c:29" \
- "#2.*main \\(\\) at ${optional_filepath}tailcall.c:37" \
+ "\\* #0.*bar \\(\\) at ${optional_filepath}tailcall.c:24" \
+ " #1.*foo \\(\\) at ${optional_filepath}tailcall.c:29" \
+ " #2.*main \\(\\) at ${optional_filepath}tailcall.c:37" \
"Backtrace stopped: not enough registers or memory available to unwind further" \
]
diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp
index 443a2e89a92..9278ad46a29 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus.exp
@@ -119,7 +119,7 @@ gdb_test "compile code *(volatile int *) 0 = 0;" \
"The program being debugged was signaled while in a function called from GDB\\.\r\nGDB remains in the frame where the signal was received\\.\r\n.*" \
"compile code segfault first"
gdb_test "bt" \
- "\r\n#0 \[^\r\n\]*_gdb_expr \[^\r\n\]*\r\n#1 <function called from gdb>.*"
+ "\r\n\\* #0 \[^\r\n\]*_gdb_expr \[^\r\n\]*\r\n#1 <function called from gdb>.*"
set test "p/x \$pc"
set infcall_pc 0
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
index b7bba4c71d4..8acc8d8ac60 100644
--- a/gdb/testsuite/gdb.cp/exception.exp
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -111,7 +111,7 @@ gdb_test "continue" \
set name "backtrace after first throw"
gdb_test_multiple "backtrace" $name {
- -re ".*#${::decimal}.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#${::decimal}${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:${::decimal}\r\n#${::decimal}${ws}$hex in main \\(.*\\) at .*${srcfile}:${::decimal}\r\n$gdb_prompt $" {
+ -re ".*\\* #${::decimal}.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].* #${::decimal}${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:${::decimal}\r\n #${::decimal}${ws}$hex in main \\(.*\\) at .*${srcfile}:${::decimal}\r\n$gdb_prompt $" {
# Either __cxxabiv1::__cxa_throw or __cxa_throw can be printed
# depending on debug info presence.
pass $name
@@ -129,7 +129,7 @@ gdb_test "continue" \
set name "backtrace after first catch"
gdb_test_multiple "backtrace" $name {
- -re ".*#${::decimal}.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#${::decimal}${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:${::decimal}\r\n$gdb_prompt $" {
+ -re ".*\\* #${::decimal}.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].* #${::decimal}${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:${::decimal}\r\n$gdb_prompt $" {
pass $name
}
}
@@ -148,7 +148,7 @@ gdb_test "continue" \
set name "backtrace after second throw"
gdb_test_multiple "backtrace" $name {
- -re ".*#${::decimal}.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#${::decimal}${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:${::decimal}\r\n#${::decimal}${ws}$hex in main \\(.*\\) at .*${srcfile}:${::decimal}\r\n$gdb_prompt $" {
+ -re ".*\\* #${::decimal}.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].* #${::decimal}${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:${::decimal}\r\n #${::decimal}${ws}$hex in main \\(.*\\) at .*${srcfile}:${::decimal}\r\n$gdb_prompt $" {
pass $name
}
}
@@ -164,7 +164,7 @@ gdb_test "continue" \
set name "backtrace after second catch"
gdb_test_multiple "backtrace" $name {
- -re ".*#${::decimal}.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#${::decimal}${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:${::decimal}\r\n$gdb_prompt $" {
+ -re ".*\\* #${::decimal}.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].* #${::decimal}${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:${::decimal}\r\n$gdb_prompt $" {
pass $name
}
}
diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp
index 187073ec86e..38a397e22dc 100644
--- a/gdb/testsuite/gdb.cp/expand-sals.exp
+++ b/gdb/testsuite/gdb.cp/expand-sals.exp
@@ -46,7 +46,7 @@ gdb_continue_to_breakpoint "caller" ".*caller-line.*"
# Test GDB caught this return call and not the next one through B::B()
gdb_test "bt" \
- "#0 \[^\r\n\]* (A::)?A \[^\r\n\]*\r\n#1 \[^\r\n\]* main \[^\r\n\]*" \
+ "\\* #0 \[^\r\n\]* (A::)?A \[^\r\n\]*\r\n #1 \[^\r\n\]* main \[^\r\n\]*" \
"bt from A"
gdb_continue_to_breakpoint "next caller func" ".*func-line.*"
diff --git a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
index 3d704635901..fa6fdd8d184 100644
--- a/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
+++ b/gdb/testsuite/gdb.cp/pass-by-ref-2.exp
@@ -110,7 +110,7 @@ gdb_test "print cbvArrayContainerByRef (arrayContainerByRef)" \
".*The program being debugged stopped.*" \
"call cbvArrayContainerByRef with BP"
gdb_test "backtrace" [multi_line \
- "#0 ByRef\:\:ByRef .* at .*$srcfile:$bp_location" \
- "#1 .* ArrayContainerByRef::ArrayContainerByRef .*" \
- "#2 <function called from gdb>" \
- "#3 main.*"]
+ "\\* #0 ByRef\:\:ByRef .* at .*$srcfile:$bp_location" \
+ " #1 .* ArrayContainerByRef::ArrayContainerByRef .*" \
+ " #2 <function called from gdb>" \
+ " #3 main.*"]
diff --git a/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp b/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
index 3f7d77cf074..f614298cd85 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
@@ -81,7 +81,7 @@ if { ![runto_main] } {
#
# Make sure to match a single line, so that the test fails if an error
# about stack unwind is printed after frame 0.
-gdb_test "backtrace" "^#0 \[^\r\n\]* main \[^\r\n\]*"
+gdb_test "backtrace" "^\\* #0 \[^\r\n\]* main \[^\r\n\]*"
# Translating the location of "x" to an agent expression requires
# evaluating its frame base, which uses DW_OP_call_frame_cfa. This would
diff --git a/gdb/testsuite/gdb.dwarf2/debug-frame.exp b/gdb/testsuite/gdb.dwarf2/debug-frame.exp
index ddadab7566e..75c4224ccf4 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-frame.exp
@@ -111,7 +111,7 @@ foreach_with_prefix is_64 { false true } {
gdb_continue_to_breakpoint "callee_body"
# Verify backtrace shows the full call chain.
- gdb_test "bt" "#0.*callee.*\r\n#1.*caller.*\r\n#2.*main.*"
+ gdb_test "bt" "\\* #0.*callee.*\r\n #1.*caller.*\r\n #2.*main.*"
# Select caller's frame and check saved registers.
gdb_test "frame 1" "#1.*caller.*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
index 1be466f513c..5f8a72a2caa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
@@ -205,14 +205,14 @@ gdb_breakpoint "*foobar"
# Now hit the entry_point break point and check their call-stack.
gdb_continue_to_breakpoint "foo"
gdb_test "bt" [multi_line \
- "#0.*${hex} in foo \\(J=1, K=0\\).*" \
- "#1.*${hex} in prog \\(\\).*" \
+ "\\* #0.*${hex} in foo \\(J=1, K=0\\).*" \
+ " #1.*${hex} in prog \\(\\).*" \
] "bt foo"
gdb_continue_to_breakpoint "foobar"
gdb_test "bt" [multi_line \
- "#0.*${hex} in foobar \\(J=2\\).*" \
- "#1.*${hex} in prog \\(\\).*" \
+ "\\* #0.*${hex} in foobar \\(J=2\\).*" \
+ " #1.*${hex} in prog \\(\\).*" \
] "bt foobar"
# Now try whether we can also set breakpoints on entry_points from other CUs.
@@ -230,6 +230,6 @@ gdb_continue_to_breakpoint "foo_so"
# symbol, exactly which symbol is shown in the stack trace depends on
# which symbol gdb happens to find first in the lookup.
gdb_test "bt" [multi_line \
- "#0.*${hex} in (foo|fooso) \\(J=1, K=0\\).*" \
- "#1.*${hex} in prog \\(\\).*" \
+ "\\* #0.*${hex} in (foo|fooso) \\(J=1, K=0\\).*" \
+ " #1.*${hex} in prog \\(\\).*" \
] "bt fooso"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
index 3a34bf060d9..029dd107358 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
@@ -212,8 +212,8 @@ proc do_test { } {
set foo_body_2 [expr {$::foo_prologue + 2}]
gdb_test "bt" \
[multi_line \
- "^#0\\s+foo \\(\\) at \[^\r\n\]+$::srcfile:(?:$::foo_prologue|$foo_body_1|$foo_body_2)" \
- "#1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$::call_line"] \
+ "^\\* #0\\s+foo \\(\\) at \[^\r\n\]+$::srcfile:(?:$::foo_prologue|$foo_body_1|$foo_body_2)" \
+ " #1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$::call_line"] \
"backtrace show correct line number in main"
gdb_test "frame 1" \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 7709fec14fc..93589ca1834 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -326,18 +326,18 @@ set line_in_jjj [gdb_get_line_number "jjj return"]
set line_in_kkk [gdb_get_line_number "kkk return"]
gdb_test "bt" [multi_line \
- "#0 kkk \\(\\) at \[^\r\n\]+${srcfile}:${line_in_kkk}" \
- "#1 $hex in jjj \\(\\) at \[^\r\n\]+${srcfile}:${line_in_jjj}" \
- "#2 $hex in iii \\(\\) at \[^\r\n\]+${srcfile}:${line_in_iii}" \
- "#3 hhh \\(\\) at \[^\r\n\]+${srcfile}:${line_in_hhh}" \
- "#4 ggg \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ggg}" \
- "#5 fff \\(\\) at \[^\r\n\]+${srcfile}:${line_in_fff}" \
- "#6 $hex in eee \\(\\) at \[^\r\n\]+${srcfile}:${line_in_eee}" \
- "#7 $hex in ddd \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ddd}" \
- "#8 $hex in ccc \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ccc}" \
- "#9 bbb \\(\\) at \[^\r\n\]+${srcfile}:${line_in_bbb}" \
- "#10 aaa \\(\\) at \[^\r\n\]+${srcfile}:${line_in_aaa}" \
- "#11 main \\(\\) at \[^\r\n\]+${srcfile}:${line_in_main}" ]
+ "\\* #0 kkk \\(\\) at \[^\r\n\]+${srcfile}:${line_in_kkk}" \
+ " #1 $hex in jjj \\(\\) at \[^\r\n\]+${srcfile}:${line_in_jjj}" \
+ " #2 $hex in iii \\(\\) at \[^\r\n\]+${srcfile}:${line_in_iii}" \
+ " #3 hhh \\(\\) at \[^\r\n\]+${srcfile}:${line_in_hhh}" \
+ " #4 ggg \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ggg}" \
+ " #5 fff \\(\\) at \[^\r\n\]+${srcfile}:${line_in_fff}" \
+ " #6 $hex in eee \\(\\) at \[^\r\n\]+${srcfile}:${line_in_eee}" \
+ " #7 $hex in ddd \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ddd}" \
+ " #8 $hex in ccc \\(\\) at \[^\r\n\]+${srcfile}:${line_in_ccc}" \
+ " #9 bbb \\(\\) at \[^\r\n\]+${srcfile}:${line_in_bbb}" \
+ " #10 aaa \\(\\) at \[^\r\n\]+${srcfile}:${line_in_aaa}" \
+ " #11 main \\(\\) at \[^\r\n\]+${srcfile}:${line_in_main}" ]
# Now check we can use 'up' to inspect each frame correctly.
set patterns [list \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index e6859159c29..10c9a37596f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -62,4 +62,4 @@ if {$index == "debug_names"} {
setup_kfail "symtab/31132" *-*-*
}
-gdb_test "bt" "#0 (${::hex} in )?func \\(funcparam=<optimized out>\\)\r\n#1 main \\(mainparam=<optimized out>\\)\[^\r\n\]*"
+gdb_test "bt" "\\* #0 (${::hex} in )?func \\(funcparam=<optimized out>\\)\r\n #1 main \\(mainparam=<optimized out>\\)\[^\r\n\]*"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index 92fd7f71fb9..f842e73dc71 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -42,16 +42,16 @@ gdb_test_no_output "set print frame-arguments all"
# (1) int_param_single_reg_loc
gdb_continue_to_breakpoint "Stop in breakpt for test int_param_single_reg_loc"
-gdb_test "bt" "#0 ($hex in )?breakpt \\(\\)\r\n#1 ($hex in )?int_param_single_reg_loc \\(operand0=<optimized out>, operand1=0xdeadbe00deadbe01, operand2=<optimized out>\\)\r\n#2 ($hex in )?main \\(\\)" "backtrace for test int_param_single_reg_loc"
+gdb_test "bt" "\\* #0 ($hex in )?breakpt \\(\\)\r\n #1 ($hex in )?int_param_single_reg_loc \\(operand0=<optimized out>, operand1=0xdeadbe00deadbe01, operand2=<optimized out>\\)\r\n #2 ($hex in )?main \\(\\)" "backtrace for test int_param_single_reg_loc"
# (2) struct_param_single_reg_loc
gdb_continue_to_breakpoint "Stop in breakpt for struct_param_single_reg_loc"
-gdb_test "bt" "#0 ($hex in )?breakpt \\(\\)\r\n#1 ($hex in )?struct_param_single_reg_loc \\(operand0={a = 0xdeadbe00deadbe01, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe04deadbe05}, operand2=<optimized out>\\)\r\n#2 ($hex in )?main \\(\\)" "backtrace for test struct_param_single_reg_loc"
+gdb_test "bt" "\\* #0 ($hex in )?breakpt \\(\\)\r\n #1 ($hex in )?struct_param_single_reg_loc \\(operand0={a = 0xdeadbe00deadbe01, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe04deadbe05}, operand2=<optimized out>\\)\r\n #2 ($hex in )?main \\(\\)" "backtrace for test struct_param_single_reg_loc"
# (3) struct_param_two_reg_pieces
gdb_continue_to_breakpoint "Stop in breakpt for struct_param_two_reg_pieces"
-gdb_test "bt" "#0 ($hex in )?breakpt \\(\\)\r\n#1 ($hex in )?struct_param_two_reg_pieces \\(operand0={a = 0xdeadbe04deadbe05, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe00deadbe01}, operand2=<optimized out>\\)\r\n#2 ($hex in )?main \\(\\)" "backtrace for test struct_param_two_reg_pieces"
+gdb_test "bt" "\\* #0 ($hex in )?breakpt \\(\\)\r\n #1 ($hex in )?struct_param_two_reg_pieces \\(operand0={a = 0xdeadbe04deadbe05, b = <optimized out>}, operand1={a = <optimized out>, b = 0xdeadbe00deadbe01}, operand2=<optimized out>\\)\r\n #2 ($hex in )?main \\(\\)" "backtrace for test struct_param_two_reg_pieces"
# (4) int_param_two_reg_pieces
gdb_continue_to_breakpoint "Stop in breakpt for int_param_two_reg_pieces"
-gdb_test "bt" "#0 ($hex in )?breakpt \\(\\)\r\n#1 ($hex in )?int_param_two_reg_pieces \\(operand0=<optimized out>, operand1=<optimized out>, operand2=<optimized out>\\)\r\n#2 ($hex in )?main \\(\\)" "backtrace for test int_param_two_reg_pieces"
+gdb_test "bt" "\\* #0 ($hex in )?breakpt \\(\\)\r\n #1 ($hex in )?int_param_two_reg_pieces \\(operand0=<optimized out>, operand1=<optimized out>, operand2=<optimized out>\\)\r\n #2 ($hex in )?main \\(\\)" "backtrace for test int_param_two_reg_pieces"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 032b39912c7..41a929c6d4f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -336,10 +336,10 @@ proc do_test {suffix} {
# see foo for frames #1 and #2. It is incorrect to see
# foo_cold at frame #1.
gdb_test_sequence "bt" "backtrace from baz" {
- "\[\r\n\]#0 .*? baz \\(\\) "
- "\[\r\n\]#1 .*? foo \\(\\) "
- "\[\r\n\]#2 .*? foo \\(\\) "
- "\[\r\n\]#3 .*? main \\(\\) "
+ "\[\r\n\]\\* #0 .*? baz \\(\\) "
+ "\[\r\n\] #1 .*? foo \\(\\) "
+ "\[\r\n\] #2 .*? foo \\(\\) "
+ "\[\r\n\] #3 .*? main \\(\\) "
}
# Doing x/2i foo_cold should show foo_cold as the first symbolic
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index b9a8cbbdb31..f3a3671fa71 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -31,7 +31,7 @@ if {![runto stop_frame]} {
return
}
-gdb_test "bt" "#0 (${::hex} in )?stop_frame \[^\r\n\]*\r\n#1 \[^\r\n\]*first_frame \[^\r\n\]*\r\n#2 \[^\r\n\]*main\[^\r\n\]*" \
+gdb_test "bt" "\\* #0 (${::hex} in )?stop_frame \[^\r\n\]*\r\n #1 \[^\r\n\]*first_frame \[^\r\n\]*\r\n #2 \[^\r\n\]*main\[^\r\n\]*" \
"backtrace from stop_frame"
for {set f 0} {$f < 3} {incr f} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index e0c334f80cc..6c3c09996bf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -35,4 +35,4 @@ if {![runto foo]} {
return
}
gdb_test "continue" "$hex in foo \\(\\)"
-gdb_test "where" "#0 +$hex in foo \\(\\)\r\n#1 +$hex in _start \\(\\)"
+gdb_test "where" "\\* #0 +$hex in foo \\(\\)\r\n #1 +$hex in _start \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
index bec85887e03..0c15e4c13de 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
@@ -66,5 +66,5 @@ gdb_continue_to_breakpoint "func_demangled_test"
gdb_test "backtrace" \
[multi_line \
- "#0.*in func_demangled_test ()\[^\r\n\]+" \
- "#1.*in main ()\[^\r\n\]+" ]
+ "\\* #0.*in func_demangled_test ()\[^\r\n\]+" \
+ " #1.*in main ()\[^\r\n\]+" ]
diff --git a/gdb/testsuite/gdb.fortran/backtrace.exp b/gdb/testsuite/gdb.fortran/backtrace.exp
index 32adad8dd1b..187e17764ba 100644
--- a/gdb/testsuite/gdb.fortran/backtrace.exp
+++ b/gdb/testsuite/gdb.fortran/backtrace.exp
@@ -33,6 +33,6 @@ gdb_continue_to_breakpoint "continue to bar"
gdb_test "bt" \
[multi_line \
- "#0\[ \t\]*bar \\(\\) at \[^\r\n\]+" \
- "#1\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
- "#2\[ \t\]*$hex in \(?:MAIN__\|main\) \\(\\) at \[^\r\n\]+" ]
+ "\\* #0\[ \t\]*bar \\(\\) at \[^\r\n\]+" \
+ " #1\[ \t\]*$hex in foo \\(\\) at \[^\r\n\]+" \
+ " #2\[ \t\]*$hex in \(?:MAIN__\|main\) \\(\\) at \[^\r\n\]+" ]
diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
index 43f77d3eb66..99f8f52b985 100644
--- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
+++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
@@ -65,16 +65,16 @@ proc run_tests { lang } {
set 1g_args "obj=\[^\r\n\]+"
set bt_stack \
[multi_line \
- "#0\\s+breakpt \\(\\) at \[^\r\n\]+" \
- "#1\\s+$hex in mixed_func_1h \\(\\) at \[^\r\n\]+" \
- "#2\\s+$hex in mixed_func_1g \\($1g_args\\) at \[^\r\n\]+" \
- "#3\\s+$hex in mixed_func_1f \\(\\) at \[^\r\n\]+" \
- "#4\\s+$hex in mixed_func_1e \\(\\) at \[^\r\n\]+" \
- "#5\\s+$hex in mixed_func_1d \\(\[^\r\n\]+\\) at \[^\r\n\]+" \
- "#6\\s+$hex in mixed_func_1c \\(\[^\r\n\]+\\) at \[^\r\n\]+" \
- "#7\\s+$hex in mixed_func_1b \\($1b_args\\) at \[^\r\n\]+" \
- "#8\\s+$hex in mixed_func_1a \\(\\) at \[^\r\n\]+" \
- "#9\\s+$hex in mixed_stack_main \\(\\) at \[^\r\n\]+" ]
+ "\\* #0\\s+breakpt \\(\\) at \[^\r\n\]+" \
+ " #1\\s+$hex in mixed_func_1h \\(\\) at \[^\r\n\]+" \
+ " #2\\s+$hex in mixed_func_1g \\($1g_args\\) at \[^\r\n\]+" \
+ " #3\\s+$hex in mixed_func_1f \\(\\) at \[^\r\n\]+" \
+ " #4\\s+$hex in mixed_func_1e \\(\\) at \[^\r\n\]+" \
+ " #5\\s+$hex in mixed_func_1d \\(\[^\r\n\]+\\) at \[^\r\n\]+" \
+ " #6\\s+$hex in mixed_func_1c \\(\[^\r\n\]+\\) at \[^\r\n\]+" \
+ " #7\\s+$hex in mixed_func_1b \\($1b_args\\) at \[^\r\n\]+" \
+ " #8\\s+$hex in mixed_func_1a \\(\\) at \[^\r\n\]+" \
+ " #9\\s+$hex in mixed_stack_main \\(\\) at \[^\r\n\]+" ]
set main_args "argc=1, argv=${hex}( \[^\r\n\]+)?"
set bt_stack_kfail \
[multi_line \
diff --git a/gdb/testsuite/gdb.opt/empty-inline-cxx.exp b/gdb/testsuite/gdb.opt/empty-inline-cxx.exp
index 2f945143981..0f947714fdd 100644
--- a/gdb/testsuite/gdb.opt/empty-inline-cxx.exp
+++ b/gdb/testsuite/gdb.opt/empty-inline-cxx.exp
@@ -67,7 +67,7 @@ proc run_test { opt_level } {
return
}
- gdb_test "bt" "#0\\s+(?:$::hex in )?main \\(\\) at [remote_file_re $::srcfile]:$::decimal" \
+ gdb_test "bt" "\\* #0\\s+(?:$::hex in )?main \\(\\) at [remote_file_re $::srcfile]:$::decimal" \
"backtrace in main"
# Break at the empty inline function ptr::get_myclass.
@@ -80,9 +80,9 @@ proc run_test { opt_level } {
# Backtrace.
gdb_test "bt" \
[multi_line \
- "#0\\s+ptr::get_myclass \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::get_myclass_line" \
- "#1\\s+intermediate \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::call_get_line" \
- "#2\\s+\[^\r\n\]+main \\(\\) at [remote_file_re $::srcfile]:$::decimal"] \
+ "\\* #0\\s+ptr::get_myclass \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::get_myclass_line" \
+ " #1\\s+intermediate \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::call_get_line" \
+ " #2\\s+\[^\r\n\]+main \\(\\) at [remote_file_re $::srcfile]:$::decimal"] \
"at get_myclass"
# Print a class member variable, this should be in scope, but is often
@@ -99,9 +99,9 @@ proc run_test { opt_level } {
# ptr::get_myclass(), which is not correct.
gdb_test "bt" \
[multi_line \
- "#0\\s+MyClass::call \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::final_bp_line" \
- "#1\\s+\[^\r\n\]+ intermediate \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::call_get_line" \
- "#2\\s+\[^\r\n\]+ main \\(\\) at [remote_file_re $::srcfile]:$::decimal"] \
+ "\\* #0\\s+MyClass::call \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::final_bp_line" \
+ " #1\\s+\[^\r\n\]+ intermediate \\(\[^)\]*\\) at [remote_file_re $::srcfile]:$::call_get_line" \
+ " #2\\s+\[^\r\n\]+ main \\(\\) at [remote_file_re $::srcfile]:$::decimal"] \
"at call"
}
diff --git a/gdb/testsuite/gdb.opt/inline-bt.exp b/gdb/testsuite/gdb.opt/inline-bt.exp
index cc21aaaa15e..b3e1c37553e 100644
--- a/gdb/testsuite/gdb.opt/inline-bt.exp
+++ b/gdb/testsuite/gdb.opt/inline-bt.exp
@@ -102,12 +102,12 @@ proc run_test { opt_level } {
".*b/p in not_inline_func.*"
gdb_test "bt" \
[multi_line \
- "^#0\\s+not_inline_func \\(\[^)\]+\\) at \[^\r\n\]+$::srcfile:$line2" \
- "#1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$line3"] \
+ "\\* #0\\s+not_inline_func \\(\[^)\]+\\) at \[^\r\n\]+$::srcfile:$line2" \
+ " #1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$line3"] \
"bt from not_inline_func to main"
gdb_test "frame 1" \
[multi_line \
- "^#1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$line3" \
+ "#1\\s+$::hex in main \\(\\) at \[^\r\n\]+$::srcfile:$line3" \
"$line3\\s+not_inline_func \\(return_one \\(\\)\\);\[^\r\n\]+"] \
"select frame for main from not_inline_func"
}
diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
index 52162fc9952..39a80c9a248 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
@@ -73,18 +73,18 @@ with_test_prefix "run to frame" {
with_test_prefix "frame print" {
if { [start_test "TAG: final frame"] == 0 } {
gdb_test "backtrace -frame-arguments all" [multi_line \
- "#0 .*g \\(mt=mytype is .*\\, depth=0\\).*"\
- "#1 .*g \\(mt=mytype is .*\\, depth=1\\).*"\
- "#2 .*g \\(mt=mytype is .*\\, depth=2\\).*"\
- "#3 .*g \\(mt=mytype is .*\\, depth=3\\).*"\
- "#4 .*g \\(mt=mytype is .*\\, depth=4\\).*"\
- "#5 .*g \\(mt=mytype is .*\\, depth=5\\).*"\
- "#6 .*g \\(mt=mytype is .*\\, depth=6\\).*"\
- "#7 .*g \\(mt=mytype is .*\\, depth=7\\).*"\
- "#8 .*g \\(mt=mytype is .*\\, depth=8\\).*"\
- "#9 .*g \\(mt=mytype is .*\\, depth=9\\).*"\
- "#10 .*g \\(mt=mytype is .*\\, depth=10\\).*"\
- "#11 .*main \\(\\).*"] \
+ "\\* #0 .*g \\(mt=mytype is .*\\, depth=0\\).*"\
+ " #1 .*g \\(mt=mytype is .*\\, depth=1\\).*"\
+ " #2 .*g \\(mt=mytype is .*\\, depth=2\\).*"\
+ " #3 .*g \\(mt=mytype is .*\\, depth=3\\).*"\
+ " #4 .*g \\(mt=mytype is .*\\, depth=4\\).*"\
+ " #5 .*g \\(mt=mytype is .*\\, depth=5\\).*"\
+ " #6 .*g \\(mt=mytype is .*\\, depth=6\\).*"\
+ " #7 .*g \\(mt=mytype is .*\\, depth=7\\).*"\
+ " #8 .*g \\(mt=mytype is .*\\, depth=8\\).*"\
+ " #9 .*g \\(mt=mytype is .*\\, depth=9\\).*"\
+ " #10 .*g \\(mt=mytype is .*\\, depth=10\\).*"\
+ " #11 .*main \\(\\).*"] \
"backtrace test"
}
}
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.exp
index 6a266abd790..901059f6279 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.exp
@@ -59,9 +59,9 @@ proc run_test { use_parent_frame_p } {
gdb_test "bt" \
[multi_line \
- "#0\\s+normal_function\[^\r\n\]+" \
- "#1\\s+(?:$::hex in )?tailcall_function\[^\r\n\]+" \
- "#2\\s+(?:$::hex in )?main\[^\r\n\]+"] \
+ "\\* #0\\s+normal_function\[^\r\n\]+" \
+ " #1\\s+(?:$::hex in )?tailcall_function\[^\r\n\]+" \
+ " #2\\s+(?:$::hex in )?main\[^\r\n\]+"] \
"check call stack"
gdb_test "source $::pyfile" "Python script imported" "import python scripts"
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
index 1c85a8afcb3..4b25d6d5a7b 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
@@ -37,10 +37,10 @@ gdb_continue_to_breakpoint "run to test breakpoint"
gdb_test "bt" \
[multi_line \
- "#0 func3 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:21" \
- "#1 $hex in func2 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:27" \
- "#2 $hex in func1 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:33" \
- "#3 $hex in main \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:39" ] \
+ "\\* #0 func3 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:21" \
+ " #1 $hex in func2 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:27" \
+ " #2 $hex in func1 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:33" \
+ " #3 $hex in main \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:39" ] \
"backtrace without frame filters"
# Make the frame filters Python script available.
@@ -53,8 +53,8 @@ gdb_test_no_output "source ${remote_python_file}" "load python file"
gdb_test "bt" \
[multi_line \
- "#0 func3 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:21" \
- "#1 $hex in func2 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:27" \
- "#2 $hex in func1 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:33" \
- "#3 $hex in main \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:39" ] \
+ "\\* #0 func3 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:21" \
+ " #1 $hex in func2 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:27" \
+ " #2 $hex in func1 \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:33" \
+ " #3 $hex in main \\(\\) at \[^\r\n\]+/py-framefilter-addr.c:39" ] \
"backtrace with frame filters"
diff --git a/gdb/testsuite/gdb.python/py-inf-exited-at-exit.exp b/gdb/testsuite/gdb.python/py-inf-exited-at-exit.exp
index 3b6764abff7..f25abe1588e 100644
--- a/gdb/testsuite/gdb.python/py-inf-exited-at-exit.exp
+++ b/gdb/testsuite/gdb.python/py-inf-exited-at-exit.exp
@@ -78,8 +78,8 @@ proc clean_restart_and_runto_foo {} {
proc check_backtrace { testname } {
gdb_test "bt" \
[multi_line \
- "#0 (?:$::hex in )?foo \\(\\) at \[^\r\n\]+" \
- "#1 (?:$::hex in )?main \\(\\) at \[^\r\n\]+"] \
+ "\\* #0 (?:$::hex in )?foo \\(\\) at \[^\r\n\]+" \
+ " #1 (?:$::hex in )?main \\(\\) at \[^\r\n\]+"] \
$testname
}
diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
index 0e10b8065d1..a3adbc1c6ce 100644
--- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp
+++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
@@ -36,11 +36,11 @@ gdb_continue_to_breakpoint "stop at test breakpoint"
# An initial look at the stack to ensure it is correct.
gdb_test_sequence "bt" "Initial backtrace" {
- "\\r\\n#0 \[^\r\n\]* f0 \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* f1 \\(\\) at "
- "\\r\\n#2 \[^\r\n\]* f2 \\(\\) at "
- "\\r\\n#3 \[^\r\n\]* f3 \\(\\) at "
- "\\r\\n#4 \[^\r\n\]* main \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* f0 \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* f1 \\(\\) at "
+ "\\r\\n #2 \[^\r\n\]* f2 \\(\\) at "
+ "\\r\\n #3 \[^\r\n\]* f3 \\(\\) at "
+ "\\r\\n #4 \[^\r\n\]* main \\(\\) at "
}
# Load the script containing the unwinder.
@@ -52,12 +52,12 @@ gdb_test_no_output "source ${pyfile}"\
gdb_test_sequence "bt" "Backtrace with extra Python output" {
"Func f0, Level 0"
"Func f1, Level 1"
- "\\r\\n#0 \[^\r\n\]* f0 \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* f1 \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* f0 \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* f1 \\(\\) at "
"Func f2, Level 2"
- "\\r\\n#2 \[^\r\n\]* f2 \\(\\) at "
+ "\\r\\n #2 \[^\r\n\]* f2 \\(\\) at "
"Func f3, Level 3"
- "\\r\\n#3 \[^\r\n\]* f3 \\(\\) at "
+ "\\r\\n #3 \[^\r\n\]* f3 \\(\\) at "
"Func main, Level 4"
- "\\r\\n#4 \[^\r\n\]* main \\(\\) at "
+ "\\r\\n #4 \[^\r\n\]* main \\(\\) at "
}
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
index 25cefc9b87e..ee189dea3ed 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
@@ -70,10 +70,10 @@ proc cont_and_backtrace { tst } {
# Python-based unwinder.
gdb_test_sequence "bt" "backtrace" {
- "\\r\\n#0 .* ccc \\(arg=789\\) at "
- "\\r\\n#1 .* bbb \\(arg=456\\) at "
- "\\r\\n#2 .* aaa \\(arg=123\\) at "
- "\\r\\n#3 .* main \\(.*\\) at"
+ "\\r\\n\\* #0 .* ccc \\(arg=789\\) at "
+ "\\r\\n #1 .* bbb \\(arg=456\\) at "
+ "\\r\\n #2 .* aaa \\(arg=123\\) at "
+ "\\r\\n #3 .* main \\(.*\\) at"
}
# Test that the python-based unwinder / sniffer was actually called
diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp
index d7d82913f61..5485d8b0490 100644
--- a/gdb/testsuite/gdb.python/py-unwind-inline.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp
@@ -42,6 +42,6 @@ gdb_test "source ${pyfile}" "Python script imported" \
gdb_continue_to_breakpoint "foo"
gdb_test_sequence "backtrace" "backtrace with dummy unwinder" {
- "\\r\\n#0 foo \\(\\)"
- "\\r\\n#1 main \\(\\)"
+ "\\r\\n\\* #0 foo \\(\\)"
+ "\\r\\n #1 main \\(\\)"
}
diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp
index e2ec925a080..14a4d56dae7 100644
--- a/gdb/testsuite/gdb.python/py-unwind-maint.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp
@@ -67,5 +67,5 @@ gdb_test_sequence "info unwinder" "Show with global unwinder disabled" {
}
gdb_test_sequence "where" "Global unwinder disabled" {
- "py_unwind_maint_ps_unwinder called\r\n#0 main"
+ "py_unwind_maint_ps_unwinder called\r\n\\* #0 main"
}
diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
index 248996c5161..12049172ecf 100644
--- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
@@ -66,8 +66,8 @@ gdb_test "disable unwinder global \"break unwinding using strings\"" \
# At this point we are using the unwinder that passes a
# gdb.RegisterDescriptor to add_saved_register.
gdb_test_sequence "bt" "Backtrace corrupted by descriptor based unwinder" {
- "\\r\\n#0 \[^\r\n\]* foo \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* bar \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* foo \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* bar \\(\\) at "
"Backtrace stopped: previous frame inner to this frame \\(corrupt stack\\?\\)"
}
@@ -79,8 +79,8 @@ gdb_test "disable unwinder global \"break unwinding using descriptors\"" \
gdb_test "enable unwinder global \"break unwinding using strings\"" \
"1 unwinder enabled" "enable the unwinder that uses strings"
gdb_test_sequence "bt" "Backtrace corrupted by string based unwinder" {
- "\\r\\n#0 \[^\r\n\]* foo \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* bar \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* foo \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* bar \\(\\) at "
"Backtrace stopped: previous frame inner to this frame \\(corrupt stack\\?\\)"
}
@@ -90,7 +90,7 @@ gdb_test_sequence "bt" "Backtrace corrupted by string based unwinder" {
gdb_test "disable unwinder global \"break unwinding using strings\"" \
"1 unwinder disabled" "disable the unwinder that uses strings again"
gdb_test_sequence "bt" "Backtrace not corrupted when using no unwinder" {
- "\\r\\n#0 \[^\r\n\]* foo \\(\\) at "
- "\\r\\n#1 \[^\r\n\]* bar \\(\\) at "
- "\\r\\n#2 \[^\r\n\]* main \\(\\) at "
+ "\\r\\n\\* #0 \[^\r\n\]* foo \\(\\) at "
+ "\\r\\n #1 \[^\r\n\]* bar \\(\\) at "
+ "\\r\\n #2 \[^\r\n\]* main \\(\\) at "
}
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index af864dceedf..494bf35f165 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -43,8 +43,8 @@ if {![runto_main]} {
# Check for the corrupt backtrace.
proc check_for_broken_backtrace {testname} {
gdb_test_sequence "where" $testname {
- "\\r\\n#0 .* corrupt_frame_inner \\(\\) at "
- "\\r\\n#1 .* corrupt_frame_outer \\(\\) at "
+ "\\r\\n\\* #0 .* corrupt_frame_inner \\(\\) at "
+ "\\r\\n #1 .* corrupt_frame_outer \\(\\) at "
"Backtrace stopped: frame did not save the PC"
}
}
@@ -52,9 +52,9 @@ proc check_for_broken_backtrace {testname} {
# Check for the correct backtrace.
proc check_for_fixed_backtrace {testname} {
gdb_test_sequence "where" $testname {
- "\\r\\n#0 .* corrupt_frame_inner \\(\\) at "
- "\\r\\n#1 .* corrupt_frame_outer \\(\\) at "
- "\\r\\n#2 .* main \\(.*\\) at"
+ "\\r\\n\\* #0 .* corrupt_frame_inner \\(\\) at "
+ "\\r\\n #1 .* corrupt_frame_outer \\(\\) at "
+ "\\r\\n #2 .* main \\(.*\\) at"
}
}
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
index ae700b8715c..65d4b10e141 100644
--- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
@@ -51,7 +51,7 @@ global decimal
#
# This is a "backtrace break" ("btb"):
#
-set btb "\[^\r\n\]+\[\r\n\]+\#${decimal}\[ \t\]+${hex} (\\\[PAC\\\] )?in "
+set btb "\[^\r\n\]+\[\r\n\]+ #${decimal}\[ \t\]+${hex} (\\\[PAC\\\] )?in "
# One of the threads is blocked on a call to pthread_cond_wait, and
# we want to verify that we are able to get a sensible backtrace for
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index fe652b827f0..27153e9f5c1 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -176,9 +176,9 @@ gdb_continue_to_breakpoint "foo"
gdb_test_no_output "set print entry-values both"
gdb_test_sequence "bt" "bt, 1" {
- "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=2, j=[-]?[0-9]+, j@entry=3\\)"
- "\[\r\n\]#1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
- "\[\r\n\]#2 .* \.?main \\(\\)"
+ "\[\r\n\]\\* #0 .* foo \\(i=[-]?[0-9]+, i@entry=2, j=[-]?[0-9]+, j@entry=3\\)"
+ "\[\r\n\] #1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
+ "\[\r\n\] #2 .* \.?main \\(\\)"
}
# Update global variables 'global1' and 'global2' and test that the
@@ -188,9 +188,9 @@ gdb_test_no_output "set var *(int *) &global1=10"
gdb_test_no_output "set var *(int *) &global2=11"
gdb_test_sequence "bt" "bt, 2" {
- "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=10, j=[-]?[0-9]+, j@entry=11\\)"
- "\[\r\n\]#1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
- "\[\r\n\]#2 .* \.?main \\(\\)"
+ "\[\r\n\]\\* #0 .* foo \\(i=[-]?[0-9]+, i@entry=10, j=[-]?[0-9]+, j@entry=11\\)"
+ "\[\r\n\] #1 .* bar \\(i=<optimized out>, i@entry=<optimized out>\\)"
+ "\[\r\n\] #2 .* \.?main \\(\\)"
}
# Restart GDB and trace.
@@ -227,7 +227,7 @@ gdb_test_no_output "tstop"
gdb_test "tfind" "Found trace frame 0, .*" "tfind start"
# Since 'global2' is not collected, j@entry is expected to be 'unavailable'.
-gdb_test "bt 1" "#0 .* foo \\(i=\[-\]?$decimal, i@entry=2, j=\[-\]?$decimal, j@entry=<unavailable>\\).*"
+gdb_test "bt 1" "\\* #0 .* foo \\(i=\[-\]?$decimal, i@entry=2, j=\[-\]?$decimal, j@entry=<unavailable>\\).*"
# Test that unavailable "j@entry" is not shown when command option
# --skip-unavailable is used.
--
2.49.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Show the selected frame in "bt"
2026-07-05 12:26 [PATCH v2] Show the selected frame in "bt" Tom Tromey
@ 2026-07-05 13:06 ` Eli Zaretskii
2026-07-21 14:55 ` Philippe Waroquiers
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2026-07-05 13:06 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Sun, 5 Jul 2026 06:26:09 -0600
>
> I've occasionally wished that "bt" would indicate the selected frame.
> This patch implements this idea. In particular it marks the selected
> frame with "*", similar to other "selected" output in gdb. (See that
> other series where emoji were allowed in the "current" column of a
> table; if that is ever resurrected, I'd expect the same treatment to
> be applied here.)
>
> Now the output looks like:
>
> (gdb) bt
> #0 0x00007ffff6e381fd in poll () from /lib64/libc.so.6
> #1 0x000000000100b1ee in gdb_wait_for_event (block=1) at ../../binutils-gdb/gdbsupport/event-loop.cc:587
> #2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263
> * #3 0x00000000007d2c6a in interp::do_one_event (this=<optimized out>, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90
> #4 start_event_loop () at ../../binutils-gdb/gdb/main.c:400
> #5 captured_command_loop () at ../../binutils-gdb/gdb/main.c:465
> #6 0x00000000007d5715 in captured_main (context=context@entry=0x7fffffffdd10) at ../../binutils-gdb/gdb/main.c:1373
> #7 gdb_main (args=args@entry=0x7fffffffdd50) at ../../binutils-gdb/gdb/main.c:1392
> #8 0x0000000000452cd5 in main (argc=1, argv=0x7fffffffdea8) at ../../binutils-gdb/gdb/gdb.c:38
>
> I think the main downside of this patch is that it uses a little more
> horizontal space for the indicator.
>
> Compared to v1, this version just fixes the test suite. Note that
> there may be other tests that need updating but that I couldn't test.
>
> Regression tested on x86-64 Fedora 40.
> ---
> gdb/NEWS | 3 +
> gdb/doc/gdb.texinfo | 62 ++--
> gdb/extension-priv.h | 3 +-
> gdb/extension.c | 8 +-
> gdb/extension.h | 3 +-
> gdb/frame.h | 3 +-
> gdb/gstack-1.in | 2 +-
> gdb/mi/mi-cmd-stack.c | 8 +-
> gdb/python/py-framefilter.c | 18 +-
> gdb/python/python-internal.h | 3 +-
> gdb/stack.c | 39 ++-
> .../gdb.ada/out_of_line_in_inlined.exp | 6 +-
> gdb/testsuite/gdb.arch/amd64-entry-value.exp | 52 +--
> .../gdb.arch/amd64-invalid-stack-middle.exp | 4 +-
> .../gdb.arch/amd64-invalid-stack-top.exp | 4 +-
> gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp | 2 +-
> .../gdb.arch/amd64-tailcall-noret.exp | 2 +-
> .../gdb.arch/amd64-tailcall-self.exp | 2 +-
> .../gdb.arch/i386-attach-see-vdso.exp | 2 +-
> gdb/testsuite/gdb.arch/i386-signal.exp | 2 +-
> gdb/testsuite/gdb.base/annota1.exp | 6 +-
> .../gdb.base/backtrace-through-cu-nodebug.exp | 8 +-
> gdb/testsuite/gdb.base/backtrace.exp | 16 +-
> .../gdb.base/bad-frame-selection.exp | 16 +-
> gdb/testsuite/gdb.base/break-interp.exp | 6 +-
> gdb/testsuite/gdb.base/break.exp | 4 +-
> gdb/testsuite/gdb.base/bt-selected-frame.exp | 12 +-
> gdb/testsuite/gdb.base/dfp-test.exp | 6 +-
> gdb/testsuite/gdb.base/frame-args.exp | 2 +-
> gdb/testsuite/gdb.base/frame-selection.exp | 6 +-
> gdb/testsuite/gdb.base/funcargs.exp | 316 +++++++++---------
> gdb/testsuite/gdb.base/gcore.exp | 18 +-
> gdb/testsuite/gdb.base/gdb1250.exp | 4 +-
> gdb/testsuite/gdb.base/gstack.exp | 2 +-
> gdb/testsuite/gdb.base/hbreak2.exp | 6 +-
> .../gdb.base/inline-frame-cycle-unwind.exp | 38 +--
> gdb/testsuite/gdb.base/jit-reader.exp | 16 +-
> gdb/testsuite/gdb.base/large-frame.exp | 6 +-
> gdb/testsuite/gdb.base/pc-not-saved.exp | 6 +-
> gdb/testsuite/gdb.base/readnever.exp | 8 +-
> gdb/testsuite/gdb.base/recpar.exp | 2 +-
> gdb/testsuite/gdb.base/sepdebug.exp | 6 +-
> gdb/testsuite/gdb.base/sigaltstack.exp | 16 +-
> gdb/testsuite/gdb.base/siginfo.exp | 6 +-
> gdb/testsuite/gdb.base/sigstep.exp | 18 +-
> gdb/testsuite/gdb.base/tailcall-msym.exp | 6 +-
> gdb/testsuite/gdb.base/until-in-tailcall.exp | 6 +-
> .../gdb.base/unwind-on-each-insn.exp.tcl | 2 +-
> gdb/testsuite/gdb.btrace/record_goto.exp | 6 +-
> gdb/testsuite/gdb.btrace/tailcall.exp | 6 +-
> gdb/testsuite/gdb.compile/compile-cplus.exp | 2 +-
> gdb/testsuite/gdb.cp/exception.exp | 8 +-
> gdb/testsuite/gdb.cp/expand-sals.exp | 2 +-
> gdb/testsuite/gdb.cp/pass-by-ref-2.exp | 8 +-
> .../gdb.dwarf2/debug-frame-no-cfa.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/debug-frame.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp | 12 +-
> gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp | 4 +-
> .../gdb.dwarf2/dw2-inline-many-frames.exp | 24 +-
> gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp | 8 +-
> gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 8 +-
> .../gdb.dwarf2/dw2-reg-undefined.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 2 +-
> .../gdb.dwarf2/dw2-wrong-mangled-name.exp | 4 +-
> gdb/testsuite/gdb.fortran/backtrace.exp | 6 +-
> .../gdb.fortran/mixed-lang-stack.exp | 20 +-
> gdb/testsuite/gdb.opt/empty-inline-cxx.exp | 14 +-
> gdb/testsuite/gdb.opt/inline-bt.exp | 6 +-
> .../gdb.python/pretty-print-call-by-hand.exp | 24 +-
> .../py-finish-breakpoint-tailcall.exp | 6 +-
> .../gdb.python/py-framefilter-addr.exp | 16 +-
> .../gdb.python/py-inf-exited-at-exit.exp | 4 +-
> .../gdb.python/py-pending-frame-level.exp | 20 +-
> .../gdb.python/py-recurse-unwind.exp | 8 +-
> gdb/testsuite/gdb.python/py-unwind-inline.exp | 4 +-
> gdb/testsuite/gdb.python/py-unwind-maint.exp | 2 +-
> .../gdb.python/py-unwind-user-regs.exp | 14 +-
> gdb/testsuite/gdb.python/py-unwind.exp | 10 +-
> .../gdb.threads/pthread_cond_wait.exp | 2 +-
> gdb/testsuite/gdb.trace/entry-values.exp | 14 +-
> 81 files changed, 552 insertions(+), 512 deletions(-)
Thanks, the documentation parts are approved.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Show the selected frame in "bt"
2026-07-05 12:26 [PATCH v2] Show the selected frame in "bt" Tom Tromey
2026-07-05 13:06 ` Eli Zaretskii
@ 2026-07-21 14:55 ` Philippe Waroquiers
2026-07-21 17:50 ` Tom Tromey
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Waroquiers @ 2026-07-21 14:55 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On Sun, 2026-07-05 at 06:26 -0600, Tom Tromey wrote:
> I've occasionally wished that "bt" would indicate the selected frame.
> This patch implements this idea. In particular it marks the selected
> frame with "*", similar to other "selected" output in gdb. (See that
> other series where emoji were allowed in the "current" column of a
> table; if that is ever resurrected, I'd expect the same treatment to
> be applied here.)
>
> Now the output looks like:
>
> (gdb) bt
> #0 0x00007ffff6e381fd in poll () from /lib64/libc.so.6
> #1 0x000000000100b1ee in gdb_wait_for_event (block=1) at ../../binutils-gdb/gdbsupport/event-loop.cc:587
> #2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263
> * #3 0x00000000007d2c6a in interp::do_one_event (this=<optimized out>, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90
> #4 start_event_loop () at ../../binutils-gdb/gdb/main.c:400
> #5 captured_command_loop () at ../../binutils-gdb/gdb/main.c:465
> #6 0x00000000007d5715 in captured_main (context=context@entry=0x7fffffffdd10) at ../../binutils-gdb/gdb/main.c:1373
> #7 gdb_main (args=args@entry=0x7fffffffdd50) at ../../binutils-gdb/gdb/main.c:1392
> #8 0x0000000000452cd5 in main (argc=1, argv=0x7fffffffdea8) at ../../binutils-gdb/gdb/gdb.c:38
>
> I think the main downside of this patch is that it uses a little more
> horizontal space for the indicator.
Maybe you could instead replace the # by a * for the selected frame so as to have:
(gdb) bt
#0 0x00007ffff6e381fd in poll () from /lib64/libc.so.6
#1 0x000000000100b1ee in gdb_wait_for_event (block=1) at ../../binutils-gdb/gdbsupport/event-loop.cc:587
#2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263
*3 0x00000000007d2c6a in interp::do_one_event (this=<optimized out>, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90
#4 start_event_loop () at ../../binutils-gdb/gdb/main.c:400
#5 captured_command_loop () at ../../binutils-gdb/gdb/main.c:465
#6 0x00000000007d5715 in captured_main (context=context@entry=0x7fffffffdd10) at ../../binutils-gdb/gdb/main.c:1373
#7 gdb_main (args=args@entry=0x7fffffffdd50) at ../../binutils-gdb/gdb/main.c:1392
#8 0x0000000000452cd5 in main (argc=1, argv=0x7fffffffdea8) at ../../binutils-gdb/gdb/gdb.c:38
Philippe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Show the selected frame in "bt"
2026-07-21 14:55 ` Philippe Waroquiers
@ 2026-07-21 17:50 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2026-07-21 17:50 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: Tom Tromey, gdb-patches
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> Maybe you could instead replace the # by a * for the selected frame so as to have:
Philippe> #2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263
Philippe> *3 0x00000000007d2c6a in interp::do_one_event (this=<optimized out>, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90
That's too subtle for my taste.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-21 17:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-05 12:26 [PATCH v2] Show the selected frame in "bt" Tom Tromey
2026-07-05 13:06 ` Eli Zaretskii
2026-07-21 14:55 ` Philippe Waroquiers
2026-07-21 17:50 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox