diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-11-20 10:10:17 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-11-20 10:10:17 +0000 |
commit | a728960949c7e21c6172b3464a4e7a91f65d4baa (patch) | |
tree | e80e62854232bbfe615b082572cc7ba85eb56cba /gdb/dwarf2-frame.c | |
parent | 3e0f14040c874aadbf96d1c9c922e3fcb3ab6c4e (diff) | |
download | gdb-a728960949c7e21c6172b3464a4e7a91f65d4baa.zip gdb-a728960949c7e21c6172b3464a4e7a91f65d4baa.tar.gz gdb-a728960949c7e21c6172b3464a4e7a91f65d4baa.tar.bz2 |
* dwarf2-frame.c (read_encoded_value): Correctly calculate number
of bytes read for aligned LEB128 encodings.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 03984e2..fc0ac8b 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1176,7 +1176,7 @@ read_encoded_value (struct comp_unit *unit, unsigned char encoding, { 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 *unit, unsigned char encoding, { 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: |