This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

[COMMIT] Fix reading aligned LEB128 encodings in DWARF CFI


I don't think anyone will actually use those, but just in case...

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* dwarf2-frame.c (read_encoded_value): Correctly calculate number
	of bytes read for aligned LEB128 encodings.

Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.46
diff -u -p -r1.46 dwarf2-frame.c
--- dwarf2-frame.c 9 Nov 2004 19:51:44 -0000 1.46
+++ dwarf2-frame.c 20 Nov 2004 10:08:03 -0000
@@ -1176,7 +1176,7 @@ read_encoded_value (struct comp_unit *un
       {
 	ULONGEST value;
 	unsigned char *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
-	*bytes_read_ptr = read_uleb128 (buf, end_buf, &value) - buf;
+	*bytes_read_ptr += read_uleb128 (buf, end_buf, &value) - buf;
 	return base + value;
       }
     case DW_EH_PE_udata2:
@@ -1192,7 +1192,7 @@ read_encoded_value (struct comp_unit *un
       {
 	LONGEST value;
 	char *end_buf = buf + (sizeof (value) + 1) * 8 / 7;
-	*bytes_read_ptr = read_sleb128 (buf, end_buf, &value) - buf;
+	*bytes_read_ptr += read_sleb128 (buf, end_buf, &value) - buf;
 	return base + value;
       }
     case DW_EH_PE_sdata2:


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