Bug 589467 - gdb issues with DW_OP_*piece
gdb issues with DW_OP_*piece
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 597848
  Show dependency treegraph
 
Reported: 2010-05-06 04:54 EDT by Jakub Jelinek
Modified: 2010-05-31 14:26 EDT (History)
3 users (show)

See Also:
Fixed In Version: gdb-7.1-23.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 597848 (view as bug list)
Environment:
Last Closed: 2010-05-31 14:26:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sra-1.c (1.08 KB, text/plain)
2010-05-06 04:54 EDT, Jakub Jelinek
no flags Details
sra-1.s (29.08 KB, text/plain)
2010-05-06 04:59 EDT, Jakub Jelinek
no flags Details

  None (edit)
Description Jakub Jelinek 2010-05-06 04:54:16 EDT
Created attachment 411878 [details]
sra-1.c

On the attached testcase:

(gdb) b 20
(gdb) b 31
(gdb) b 42
(gdb) r

(gdb) p a
$1 = {i = 4, j = 14}
(gdb) p a.i
$2 = 4
(gdb) p a.j
$3 = 4
(gdb) c

$3 is wrong, should have been 14.  The debug info looks correct and, after all,
p a printed it correctly too.

(gdb) p a
$4 = {4, 14}
(gdb) p a[0]
Can't take address of "a" which isn't an lvalue.
(gdb) p a[1]
Can't take address of "a" which isn't an lvalue.
(gdb) c

When p a is able to print it, so should IMHO p a[0] or p a[1].
(gdb) p a
Unhandled dwarf expression opcode 0x9d
(gdb) p a.i
Unhandled dwarf expression opcode 0x9d
(gdb) p a.j
Unhandled dwarf expression opcode 0x9d

And here DW_OP_bit_piece is unsupported.
Comment 1 Jakub Jelinek 2010-05-06 04:55:33 EDT
This is with http://gcc.gnu.org/PR43983 #c5 patch.
Comment 2 Jakub Jelinek 2010-05-06 04:56:23 EDT
Created attachment 411881 [details]
sra-1.s

gcc -g -O2 -dA generated x86-64 assembly.
Comment 3 Jakub Jelinek 2010-05-06 04:59:26 EDT
Created attachment 411883 [details]
sra-1.s

gcc -g -O2 -dA generated x86-64 assembly.
Comment 4 Tom Tromey 2010-05-21 17:19:33 EDT
I've checked in 4 patches to upstream gdb that should fix these problems.
The unavailable piece patch is not really complete (it warns and fills in
zeroes), but it is better than not getting any results at all.
Comment 6 Fedora Update System 2010-05-30 14:32:13 EDT
gdb-7.1-23.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gdb-7.1-23.fc13
Comment 7 Fedora Update System 2010-05-31 14:26:04 EDT
gdb-7.1-23.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.