This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: DW_OP_call_frame_cfa, again


>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> Please don't hardcode "run".  It won't work with remote targets
Pedro> (e.g., gdbserver).

Sorry about that.

This uses runto_main and gdb_continue_to_breakpoint, which should work
everywhere, at least if other tests are any indication.

Tom

2009-09-02  Tom Tromey  <tromey@redhat.com>

	* gdb.dwarf2/callframecfa.exp: Use gdb_continue_to_breakpoint.

Index: gdb.dwarf2/callframecfa.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/callframecfa.exp,v
retrieving revision 1.1
diff -u -r1.1 callframecfa.exp
--- gdb.dwarf2/callframecfa.exp	2 Sep 2009 14:53:57 -0000	1.1
+++ gdb.dwarf2/callframecfa.exp	2 Sep 2009 16:32:22 -0000
@@ -44,8 +44,12 @@
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-gdb_test "break *func" "Breakpoint 1.*" "set breakpoint for call-frame-cfa"
-gdb_test "run" "" "run for call-frame-cfa"
+if ![runto_main] {
+    return -1
+}
+
+gdb_test "break *func" "Breakpoint 2.*" "set breakpoint for call-frame-cfa"
+gdb_continue_to_breakpoint "continue to breakpoint for call-frame-cfa"
 gdb_test "display arg" "arg = 77" "set display for call-frame-cfa"
 
 # We know how many instructions are in the function.  Note that we


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]