]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb.trace: Use manually-defined start labels in unavailable-dwarf-piece.exp
authorMarcin Kościelnicki <koriakin@0x04.net>
Sat, 5 Mar 2016 13:48:47 +0000 (14:48 +0100)
committerMarcin Kościelnicki <koriakin@0x04.net>
Wed, 9 Mar 2016 17:44:57 +0000 (18:44 +0100)
On powerpc64, foo/bar point to a function descriptor, not to function code.
Since there are no global labels pointing at the actual function code,
let's make our own.

Regression-tested on x86_64.

gdb/testsuite/ChangeLog:

* gdb.trace/unavailable-dwarf-piece.c (foo): Add foo_start_lbl label.
(bar): Add bar_start_lbl label.
* gdb.trace/unavailable-dwarf-piece.exp: Use foo/bar_start_lbl instead
of foo/bar for emitting DWARF and tracing.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.c
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp

index 668f9f072ba823617eb2a5ede79d0e0e1d619c94..ce2a190d3fad24266425716ddad1106fc98d5e24 100644 (file)
@@ -1,3 +1,10 @@
+2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * gdb.trace/unavailable-dwarf-piece.c (foo): Add foo_start_lbl label.
+       (bar): Add bar_start_lbl label.
+       * gdb.trace/unavailable-dwarf-piece.exp: Use foo/bar_start_lbl instead
+       of foo/bar for emitting DWARF and tracing.
+
 2016-03-06  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * analyze-racy-logs.py: Set executable bit.
index 94d611fb47597fc78db93f8939088c44fdab3b4c..5d12c52f606114d406ae5aff6c618a2ede625e60 100644 (file)
@@ -54,6 +54,7 @@ dummy (void)
 int
 foo (struct s x, struct s y, struct s z)
 {
+  asm (".global foo_start_lbl\nfoo_start_lbl:");
   dummy ();
   asm (".global foo_end_lbl\nfoo_end_lbl:");
   return 0;
@@ -62,6 +63,7 @@ foo (struct s x, struct s y, struct s z)
 int
 bar (struct t x, struct t y, struct t z)
 {
+  asm (".global bar_start_lbl\nbar_start_lbl:");
   dummy ();
   asm (".global bar_end_lbl\nbar_end_lbl:");
   return 0;
index b5052d114e5380da11ea8e75fe07a230b13b3814..66a09a5daf16a55d6593aab5e136c4d690c447e5 100644 (file)
@@ -175,7 +175,7 @@ Dwarf::assemble $asm_file {
            DW_TAG_subprogram {
                {name foo}
                {decl_file 1 sdata}
-               {low_pc foo addr}
+               {low_pc foo_start_lbl addr}
                {high_pc foo_end_lbl addr}
            } {
                DW_TAG_formal_parameter {
@@ -220,7 +220,7 @@ Dwarf::assemble $asm_file {
            DW_TAG_subprogram {
                {name bar}
                {decl_file 1 sdata}
-               {low_pc bar addr}
+               {low_pc bar_start_lbl addr}
                {high_pc bar_end_lbl addr}
            } {
                DW_TAG_formal_parameter {
@@ -306,7 +306,7 @@ if ![gdb_target_supports_trace] {
 gdb_breakpoint "end"
 
 with_test_prefix "tracing foo" {
-    gdb_test "trace foo" ".*"
+    gdb_test "trace *foo_start_lbl" ".*"
     gdb_test_no_output "tstart"
     gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*"
     gdb_test_no_output "tstop"
@@ -320,7 +320,7 @@ with_test_prefix "tracing foo" {
 }
 
 with_test_prefix "tracing bar" {
-    gdb_test "trace bar" ".*"
+    gdb_test "trace *bar_start_lbl" ".*"
     gdb_test_no_output "tstart"
     gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*"
     gdb_test_no_output "tstop"