Bug 720332

Summary: Wrong DWARF computation?
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jakub, jan.kratochvil, pmuldoon, sergiodj, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.3-43.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-07 00:16:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Kratochvil 2011-07-11 12:14:09 UTC
Jakub Jelinek:
I'm seeing something which looks like a gdb bug, at least on F15

volatile int v;
__attribute__((noinline, noclone))
unsigned long long
foo (unsigned long long x)
{
  unsigned long long j = x * -(0x17ULL << 31);/* { dg-final { gdb-test 12 "j" "-(0x17ULL << 31)" } } */
  v++;
  return x;
}
int
main ()
{
  return foo (1) - 1;
}
gdb prints 18446744073709550592 instead of the expected 18446744013580009472
the DWARF has DW_OP_breg5 0 DW_OP_consts -49392123904 DW_OP_mul DW_OP_stack_value for j


(gdb) p/x 18446744073709550592LL
$1 = 0xfffffffffffffc00
(gdb) p/x  18446744013580009472LL
$2 = 0xfffffff200000000

Comment 1 Jakub Jelinek 2011-07-11 13:26:18 UTC
It might be a bug Tom Tromey fixed some time ago in sleb128 parsing in gdb.

Comment 2 Jan Kratochvil 2011-07-11 13:42:58 UTC
[commit] Fix sleb128 reading
http://sourceware.org/ml/gdb-patches/2011-07/msg00270.html

Comment 3 Fedora Update System 2011-08-16 17:31:32 UTC
gdb-7.3-43.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gdb-7.3-43.fc15

Comment 4 Fedora Update System 2011-08-17 00:51:22 UTC
Package gdb-7.3-43.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdb-7.3-43.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/gdb-7.3-43.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-09-07 00:16:10 UTC
gdb-7.3-43.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.