diff options
author | Christian Eggers <ceggers@gmx.de> | 2019-03-10 19:21:52 +0100 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-03-13 13:09:03 +1030 |
commit | 71250b94dc669b285cddcb744a7b3d1c7e2ec94b (patch) | |
tree | ebcdb5c8d9ed91b4622ba4324f86186420d4c6e8 /gas/dwarf2dbg.c | |
parent | 4ffd4ef39318559f8d45ce05bba4c303e522c28e (diff) | |
download | gdb-71250b94dc669b285cddcb744a7b3d1c7e2ec94b.zip gdb-71250b94dc669b285cddcb744a7b3d1c7e2ec94b.tar.gz gdb-71250b94dc669b285cddcb744a7b3d1c7e2ec94b.tar.bz2 |
dwarf2: Fix calculation of line info offset
The units of the value returned by "frag_now_fix()" and "size" do not
match. "frag_now_fix()" returns bytes (can be 8, 16 or 32 bit), while
"size" is octets (exactly 8 bit).
* dwarf2dbg.c (dwarf2_emit_insn): Fix calculation of line info offset.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r-- | gas/dwarf2dbg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index ff7a743..45d86a6 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -579,7 +579,7 @@ dwarf2_emit_insn (int size) dwarf2_where (&loc); - dwarf2_gen_line_info (frag_now_fix () - size, &loc); + dwarf2_gen_line_info ((frag_now_fix_octets () - size) / OCTETS_PER_BYTE, &loc); dwarf2_consume_line_info (); } |