Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 589467 - gdb issues with DW_OP_*piece
Summary: gdb issues with DW_OP_*piece
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 597848
TreeView+ depends on / blocked
Reported: 2010-05-06 08:54 UTC by Jakub Jelinek
Modified: 2010-05-31 18:26 UTC (History)
3 users (show)

Fixed In Version: gdb-7.1-23.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 597848 (view as bug list)
Last Closed: 2010-05-31 18:26:08 UTC

Attachments (Terms of Use)
sra-1.c (deleted)
2010-05-06 08:54 UTC, Jakub Jelinek
no flags Details
sra-1.s (deleted)
2010-05-06 08:59 UTC, Jakub Jelinek
no flags Details

Description Jakub Jelinek 2010-05-06 08:54:16 UTC
Created attachment 411878 [details]

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 08:55:33 UTC
This is with #c5 patch.

Comment 2 Jakub Jelinek 2010-05-06 08:56:23 UTC
Created attachment 411881 [details]

gcc -g -O2 -dA generated x86-64 assembly.

Comment 3 Jakub Jelinek 2010-05-06 08:59:26 UTC
Created attachment 411883 [details]

gcc -g -O2 -dA generated x86-64 assembly.

Comment 4 Tom Tromey 2010-05-21 21:19:33 UTC
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 18:32:13 UTC
gdb-7.1-23.fc13 has been submitted as an update for Fedora 13.

Comment 7 Fedora Update System 2010-05-31 18:26:04 UTC
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.