RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 597848 - gdb issues with DW_OP_*piece
Summary: gdb issues with DW_OP_*piece
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gdb
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: Petr Muller
URL:
Whiteboard:
Depends On: 589467
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-30 18:21 UTC by Jan Kratochvil
Modified: 2016-09-20 02:06 UTC (History)
5 users (show)

Fixed In Version: gdb-7.1-24.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 589467
Environment:
Last Closed: 2010-11-10 20:26:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2010-05-30 18:21:36 UTC
+++ This bug was initially created as a clone of Bug #589467 +++

Created an attachment (id=411878)
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.

--- Additional comment from jakub on 2010-05-06 04:55:33 EDT ---

This is with http://gcc.gnu.org/PR43983 #c5 patch.

--- Additional comment from jakub on 2010-05-06 04:56:23 EDT ---

Created an attachment (id=411881)
sra-1.s

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

--- Additional comment from jakub on 2010-05-06 04:59:26 EDT ---

Created an attachment (id=411883)
sra-1.s

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

--- Additional comment from tromey on 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.

--- Additional comment from jan.kratochvil on 2010-05-30 14:19:37 EDT ---

gdb-bz589467-pieces1of4.patch
 = http://sourceware.org/ml/gdb-cvs/2010-05/msg00186.html
gdb-bz589467-pieces2of4.patch
 = http://sourceware.org/ml/gdb-cvs/2010-05/msg00188.html
 = http://sourceware.org/ml/gdb-cvs/2010-05/msg00189.html
gdb-bz589467-pieces3of4.patch 
 = http://sourceware.org/ml/gdb-cvs/2010-05/msg00190.html
gdb-bz589467-pieces4of4.patch 
 = http://sourceware.org/ml/gdb-cvs/2010-05/msg00191.html


qa_ack:
+Running gdb/testsuite/gdb.dwarf2/pieces.exp ...
+PASS: gdb.dwarf2/pieces.exp: set f1 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: continue to breakpoint: continue to f1 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: print a in pieces:f1
+PASS: gdb.dwarf2/pieces.exp: print a.j in pieces:f1
+PASS: gdb.dwarf2/pieces.exp: set f2 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: continue to breakpoint: continue to f2 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: print a in pieces:f2
+PASS: gdb.dwarf2/pieces.exp: print a[0] in pieces:f2
+PASS: gdb.dwarf2/pieces.exp: print a[1] in pieces:f2
+PASS: gdb.dwarf2/pieces.exp: set f3 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: continue to breakpoint: continue to f3 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: print a.i in pieces:f3
+PASS: gdb.dwarf2/pieces.exp: print a.j in pieces:f3
+KFAIL: gdb.dwarf2/pieces.exp: set a.i in pieces:f3 (PRMS: no bug yet)
+PASS: gdb.dwarf2/pieces.exp: print new a.i in pieces:f3
+PASS: gdb.dwarf2/pieces.exp: set f6 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: continue to breakpoint: continue to f6 breakpoint for pieces
+PASS: gdb.dwarf2/pieces.exp: print a with optimized out piece
+PASS: gdb.dwarf2/pieces.exp: print a.i with optimized out piece

Comment 1 RHEL Program Management 2010-05-30 18:35:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Petr Muller 2010-08-03 15:18:51 UTC
# runtest --tool=gdb gdb.dwarf2/pieces.exp
(...)
# of expected passes            18
# of known failures             1

Comment 4 releng-rhel@redhat.com 2010-11-10 20:26:43 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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