[gdb/testsuite] Fix gdb.arch/amd64-tailcall-self.S
authorTom de Vries <tdevries@suse.de>
Thu, 9 May 2019 10:24:38 +0000 (12:24 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 9 May 2019 10:24:38 +0000 (12:24 +0200)
commit63b667adb4a915f13ec3ace77af4b9cbd76bceac
tree7503c92fd6bf3f9ab3451a919d94c786d7367c65
parente111c7d1eb8404f29c45f3aa5dbc531062ebbd73
[gdb/testsuite] Fix gdb.arch/amd64-tailcall-self.S

The test-case gdb.arch/amd64-tailcall-self.exp fails here:
...
if ![runto b] {
    return -1
}
...
like:
...
(gdb) file build/gdb/testsuite/outputs/gdb.arch/amd64-tailcall-self/\
  amd64-tailcall-self
Reading symbols from build/gdb/testsuite/outputs/gdb.arch/\
  amd64-tailcall-self/amd64-tailcall-self...
Dwarf Error: Cannot find DIE at 0x1f5 referenced from DIE at 0x107 [in \
  module build/gdb/testsuite/outputs/gdb.arch/amd64-tailcall-self/\
  amd64-tailcall-self]
...

The problem is that in amd64-tailcall-self.S, CU-relative references are
assigned .debug_info section relative values.  [ This is similar to the
problem fixed by "Fix gdb.arch/amd64-entry-value-paramref.S". ]

Fix this by assigning CU-relative references instead.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-05-09  Tom de Vries  <tdevries@suse.de>

* gdb.arch/amd64-tailcall-self.S: Make DW_FORM_ref4 references
CU-relative.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/amd64-tailcall-self.S