This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH RFA] dwarf2read.c sign extension problem


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]