This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH RFA] dwarf2read.c sign extension problem
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH RFA] dwarf2read.c sign extension problem
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 10 May 2000 18:01:00 -0700
I request approval for committing the following patch:
* dwarf2read.c (dwarf2_const_value_data): Fix typo in sign
extension code.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/dwarf2read.c,v
retrieving revision 2.41
diff -u -p -r2.41 dwarf2read.c
--- dwarf2read.c 2000/05/01 04:46:47 2.41
+++ dwarf2read.c 2000/05/11 00:46:59
@@ -4341,7 +4341,7 @@ dwarf2_const_value_data (struct attribut
if (TYPE_UNSIGNED (SYMBOL_TYPE (sym)))
l &= ((LONGEST) 1 << bits) - 1;
else
- l = (l << (sizeof (l) - bits)) >> (sizeof (l) - bits);
+ l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits);
}
SYMBOL_VALUE (sym) = l;