From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [testsuite patch] [ppc64] +kfail: gdb_target_symbol does not support function descriptors
Date: Tue, 05 Jul 2016 14:55:00 -0000 [thread overview]
Message-ID: <20160705145454.GA26978@host1.jankratochvil.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
Hi,
Marin Cermak has found various testcases (or one of them) of GDB FAIL on
ppc64.
https://sourceware.org/bugzilla/show_bug.cgi?id=20328
# powerpc64-unknown-linux-gnu:
# FAIL: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: ptype f
# FAIL: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: ptype g
# FAIL: gdb.dwarf2/dw2-lexical-block-bare.exp: p testvar
# FAIL: gdb.dwarf2/atomic-type.exp: ptype f
#
# but:
# powerpc64le-unknown-linux-gnu does PASS them (ppc64le does not use function
# descriptors anymore)
I do not see how to really fix it, DWARF needs to contain PC addresses, not
function descriptor addresses. But .o contains only the function descriptor
address.
The DWARF as produced by Tcl Dwarf::assemble:
<1><27>: Abbrev Number: 4 (DW_TAG_subprogram)
<28> DW_AT_name : main
<2d> DW_AT_external : 1
<2e> DW_AT_low_pc : 0x1001ff98
<36> DW_AT_high_pc : 0x1002ff98
<2><3e>: Abbrev Number: 5 (DW_TAG_lexical_block)
Runtime info:
$2 = {<text variable, no debug info>} 0x10000674 <.main>
$3 = {void ()} 0x1001ff98 <main>
I haven't tried to use for DW_AT_low_pc (normally using DW_FORM_addr) to use
DW_FORM_block* with DW_OP_deref as IIRC that is unsupported by GDB's
dwarf2read.c et al.; if anyone thinks it could work I can try that.
Also I am not sure whether "powerpc64-*linux*" really catches all and only all
function descriptor platforms.
OK for check-in?
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 1863 bytes --]
gdb/testsuite/ChangeLog
2016-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/atomic-type.exp (ptype f): Add kfail testsuite/20328.
* gdb.dwarf2/dw2-bad-mips-linkage-name.exp (ptype f, ptype g): Likewise.
* gdb.dwarf2/dw2-lexical-block-bare.exp (p testvar): Likewise.
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index 7b35cad..f6557e5 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
@@ -86,4 +86,5 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \
return -1
}
+setup_kfail "powerpc64-*linux*" "testsuite/20328"
gdb_test "ptype f" "int \\(const _Atomic char \\\* volatile _Atomic\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index b1041fa..24cba04 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -68,5 +68,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \
# much matter what we test here, so long as we do something to make
# sure that the DWARF is read.
+setup_kfail "powerpc64-*linux*" "testsuite/20328"
gdb_test "ptype f" " = bool \\(\\)"
+setup_kfail "powerpc64-*linux*" "testsuite/20328"
gdb_test "ptype g" " = bool \\(\\)"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
index 3f9411e..1c8f868 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
@@ -67,4 +67,5 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \
runto_main
# FAILing GDB did print: No symbol "testvar" in current context.
+setup_kfail "powerpc64-*linux*" "testsuite/20328"
gdb_test "p testvar" { = -?[0-9]+}
next reply other threads:[~2016-07-05 14:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 14:55 Jan Kratochvil [this message]
2016-07-06 7:51 ` Yao Qi
2016-07-06 8:11 ` Jan Kratochvil
2016-07-06 19:35 ` [testsuite patchv2] [ppc64] gdb_target_symbol fix for function descriptors [Re: [testsuite patch] [ppc64] +kfail: gdb_target_symbol does not support function descriptors] Jan Kratochvil
2016-07-12 12:56 ` Yao Qi
2016-07-12 13:22 ` [testsuite patchv2] [ppc64] gdb_target_symbol fix for function descriptors [Re: [testsuite patch] [ppc64] +kfail: gdb_target Ulrich Weigand
2016-07-13 8:54 ` [testsuite patchv3] " Jan Kratochvil
2016-07-13 11:52 ` Ulrich Weigand
2016-07-13 12:02 ` [commit] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160705145454.GA26978@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox