typedef struct State_Machine_Registers
{
dwarf_vma address;
+ unsigned int view;
unsigned int file;
unsigned int line;
unsigned int column;
reset_state_machine (int is_stmt)
{
state_machine_regs.address = 0;
+ state_machine_regs.view = 0;
state_machine_regs.op_index = 0;
state_machine_regs.file = 1;
state_machine_regs.line = 1;
SAFE_BYTE_GET (adr, data, len - bytes_read - 1, end);
printf (_("set Address to 0x%s\n"), dwarf_vmatoa ("x", adr));
state_machine_regs.address = adr;
+ state_machine_regs.view = 0;
state_machine_regs.op_index = 0;
break;
unsigned char *end)
{
unsigned char *start = section->start;
+ int verbose_view = 0;
printf (_("Raw dump of debug contents of section %s:\n\n"),
section->name);
{
uladv *= linfo.li_min_insn_length;
state_machine_regs.address += uladv;
+ if (uladv)
+ state_machine_regs.view = 0;
printf (_(" Special opcode %d: "
- "advance Address by %s to 0x%s"),
+ "advance Address by %s to 0x%s%s"),
op_code, dwarf_vmatoa ("u", uladv),
- dwarf_vmatoa ("x", state_machine_regs.address));
+ dwarf_vmatoa ("x", state_machine_regs.address),
+ verbose_view && uladv
+ ? _(" (reset view)") : "");
}
else
{
- state_machine_regs.address
- += ((state_machine_regs.op_index + uladv)
+ unsigned addrdelta
+ = ((state_machine_regs.op_index + uladv)
/ linfo.li_max_ops_per_insn)
* linfo.li_min_insn_length;
+ state_machine_regs.address
+ += addrdelta;
state_machine_regs.op_index
= (state_machine_regs.op_index + uladv)
% linfo.li_max_ops_per_insn;
+ if (addrdelta)
+ state_machine_regs.view = 0;
printf (_(" Special opcode %d: "
- "advance Address by %s to 0x%s[%d]"),
+ "advance Address by %s to 0x%s[%d]%s"),
op_code, dwarf_vmatoa ("u", uladv),
dwarf_vmatoa ("x", state_machine_regs.address),
- state_machine_regs.op_index);
+ state_machine_regs.op_index,
+ verbose_view && addrdelta
+ ? _(" (reset view)") : "");
}
adv = (op_code % linfo.li_line_range) + linfo.li_line_base;
state_machine_regs.line += adv;
- printf (_(" and Line by %s to %d\n"),
+ printf (_(" and Line by %s to %d"),
dwarf_vmatoa ("d", adv), state_machine_regs.line);
+ if (verbose_view || state_machine_regs.view)
+ printf (_(" (view %u)\n"), state_machine_regs.view);
+ else
+ putchar ('\n');
+ state_machine_regs.view++;
}
else switch (op_code)
{
break;
case DW_LNS_copy:
- printf (_(" Copy\n"));
+ printf (_(" Copy"));
+ if (verbose_view || state_machine_regs.view)
+ printf (_(" (view %u)\n"), state_machine_regs.view);
+ else
+ putchar ('\n');
+ state_machine_regs.view++;
break;
case DW_LNS_advance_pc:
{
uladv *= linfo.li_min_insn_length;
state_machine_regs.address += uladv;
- printf (_(" Advance PC by %s to 0x%s\n"),
+ if (uladv)
+ state_machine_regs.view = 0;
+ printf (_(" Advance PC by %s to 0x%s%s\n"),
dwarf_vmatoa ("u", uladv),
- dwarf_vmatoa ("x", state_machine_regs.address));
+ dwarf_vmatoa ("x", state_machine_regs.address),
+ verbose_view && uladv
+ ? _(" (reset view)") : "");
}
else
{
- state_machine_regs.address
- += ((state_machine_regs.op_index + uladv)
- / linfo.li_max_ops_per_insn)
+ unsigned addrdelta
+ = ((state_machine_regs.op_index + uladv)
+ / linfo.li_max_ops_per_insn)
* linfo.li_min_insn_length;
+ state_machine_regs.address
+ += addrdelta;
state_machine_regs.op_index
= (state_machine_regs.op_index + uladv)
% linfo.li_max_ops_per_insn;
- printf (_(" Advance PC by %s to 0x%s[%d]\n"),
+ if (addrdelta)
+ state_machine_regs.view = 0;
+ printf (_(" Advance PC by %s to 0x%s[%d]%s\n"),
dwarf_vmatoa ("u", uladv),
dwarf_vmatoa ("x", state_machine_regs.address),
- state_machine_regs.op_index);
+ state_machine_regs.op_index,
+ verbose_view && addrdelta
+ ? _(" (reset view)") : "");
}
break;
{
uladv *= linfo.li_min_insn_length;
state_machine_regs.address += uladv;
- printf (_(" Advance PC by constant %s to 0x%s\n"),
+ if (uladv)
+ state_machine_regs.view = 0;
+ printf (_(" Advance PC by constant %s to 0x%s%s\n"),
dwarf_vmatoa ("u", uladv),
- dwarf_vmatoa ("x", state_machine_regs.address));
+ dwarf_vmatoa ("x", state_machine_regs.address),
+ verbose_view && uladv
+ ? _(" (reset view)") : "");
}
else
{
- state_machine_regs.address
- += ((state_machine_regs.op_index + uladv)
- / linfo.li_max_ops_per_insn)
+ unsigned addrdelta
+ = ((state_machine_regs.op_index + uladv)
+ / linfo.li_max_ops_per_insn)
* linfo.li_min_insn_length;
+ state_machine_regs.address
+ += addrdelta;
state_machine_regs.op_index
= (state_machine_regs.op_index + uladv)
% linfo.li_max_ops_per_insn;
- printf (_(" Advance PC by constant %s to 0x%s[%d]\n"),
+ if (addrdelta)
+ state_machine_regs.view = 0;
+ printf (_(" Advance PC by constant %s to 0x%s[%d]%s\n"),
dwarf_vmatoa ("u", uladv),
dwarf_vmatoa ("x", state_machine_regs.address),
- state_machine_regs.op_index);
+ state_machine_regs.op_index,
+ verbose_view && addrdelta
+ ? _(" (reset view)") : "");
}
break;
printf (_(" Advance PC by fixed size amount %s to 0x%s\n"),
dwarf_vmatoa ("u", uladv),
dwarf_vmatoa ("x", state_machine_regs.address));
+ /* Do NOT reset view. */
break;
case DW_LNS_set_prologue_end:
\[0x.*\] Extended opcode 2: set Address to 0x4
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to 0x8
\[0x.*\] Extended opcode 1: End of Sequence
\[0x0000002d\] Extended opcode 2: set Address to 0x0
\[0x00000034\] Advance Line by 3 to 4
\[0x00000036\] Copy
- \[0x00000037\] Copy
+ \[0x00000037\] Copy \(view 1\)
\[0x00000038\] Extended opcode 2: set Address to 0x4
\[0x0000003f\] Extended opcode 1: End of Sequence
\[0x0000002d\] Extended opcode 2: set Address to 0x0
\[0x00000034\] Advance Line by 3 to 4
\[0x00000036\] Copy
- \[0x00000037\] Copy
+ \[0x00000037\] Copy \(view 1\)
\[0x00000038\] Extended opcode 2: set Address to 0x4
\[0x0000003f\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to 0x0
\[0x.*\] Advance Line by 10 to 11
\[0x.*\] Copy
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12 \(view 1\)
\[0x.*\] Advance Line by -7 to 5
\[0x.*\] Special opcode 229: advance Address by 16 to 0x10 and Line by 0 to 5
\[0x.*\] Special opcode 49: advance Address by 3 to 0x13 and Line by 2 to 7
\[0x.*\] Extended opcode 2: set Address to 0x4
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to 0x8
\[0x.*\] Extended opcode 1: End of Sequence
\[0x0000002d\] Extended opcode 2: set Address to 0x0
\[0x00000034\] Advance Line by 3 to 4
\[0x00000036\] Copy
- \[0x00000037\] Copy
+ \[0x00000037\] Copy \(view 1\)
\[0x00000038\] Extended opcode 2: set Address to 0x4
\[0x0000003f\] Extended opcode 1: End of Sequence
\[0x0000002d\] Extended opcode 2: set Address to 0x0
\[0x00000034\] Advance Line by 3 to 4
\[0x00000036\] Copy
- \[0x00000037\] Copy
+ \[0x00000037\] Copy \(view 1\)
\[0x00000038\] Extended opcode 2: set Address to 0x4
\[0x0000003f\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to 0x0
\[0x.*\] Advance Line by 10 to 11
\[0x.*\] Copy
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 12 \(view 1\)
\[0x.*\] Advance Line by -7 to 5
\[0x.*\] Special opcode 229: advance Address by 16 to 0x10 and Line by 0 to 5
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x10 and Line by 1 to 6
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x10 and Line by 1 to 6 \(view 1\)
\[0x.*\] Advance PC by 5 to 0x15
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to 0x0
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to 0x4
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to 0x0
\[0x.*\] Advance Line by 3 to 4
\[0x.*\] Copy
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Extended opcode 2: set Address to 0x4
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Copy
\[0x.*\] Set basic block
- \[0x.*\] .* by 1 to 2
+ \[0x.*\] .* by 1 to 2 \(view 1\)
#pass
\[0x.*\] Copy
\[0x.*\] Advance Line by 1 to 2
\[0x.*\] Advance PC by fixed size amount 0 to 0x0
- \[0x.*\] Copy
+ \[0x.*\] Copy \(view 1\)
\[0x.*\] Advance Line by 1 to 3
\[0x.*\] Extended opcode 2: set Address to 0x.*
\[0x.*\] Copy
\[0x.*\] Extended opcode 2: set Address to .*
\[0x.*\] Copy
\[0x.*\] Set basic block
- \[0x.*\] .* by 1 to 2
+ \[0x.*\] .* by 1 to 2 \(view 1\)
#pass
Line Number Statements:
\[0x.*\] Extended opcode 2: set Address to 0x0
- \[0x.*\] Special opcode 11: advance Address by 0 to 0x0 and Line by 6 to 7
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x0 and Line by 2 to 9
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 10
+ \[0x.*\] Special opcode 11: advance Address by 0 to 0x0 and Line by 6 to 7 \(view 1\)
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x0 and Line by 2 to 9 \(view 2\)
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 10 \(view 3\)
\[0x.*\] Special opcode 120: advance Address by 8 to 0x8 and Line by 3 to 13
\[0x.*\] Special opcode 62: advance Address by 4 to 0xc and Line by 1 to 14
- \[0x.*\] Special opcode 6: advance Address by 0 to 0xc and Line by 1 to 15
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0xc and Line by 1 to 15 \(view 1\)
\[0x.*\] Special opcode 119: advance Address by 8 to 0x14 and Line by 2 to 17
\[0x.*\] Advance PC by 4 to 0x18
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Special opcode 11: advance Address by 0 to 0x0 and Line by 6 to 7
\[0x.*\] Special opcode 63: advance Address by 4 to 0x4 and Line by 2 to 9
\[0x.*\] Special opcode 120: advance Address by 8 to 0xc and Line by 3 to 12
- \[0x.*\] Special opcode 7: advance Address by 0 to 0xc and Line by 2 to 14
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0xc and Line by 2 to 14 \(view 1\)
\[0x.*\] Special opcode 120: advance Address by 8 to 0x14 and Line by 3 to 17
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x14 and Line by 2 to 19
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x14 and Line by 2 to 19 \(view 1\)
\[0x.*\] Special opcode 120: advance Address by 8 to 0x1c and Line by 3 to 22
\[0x.*\] Special opcode 63: advance Address by 4 to 0x20 and Line by 2 to 24
\[0x.*\] Special opcode 120: advance Address by 8 to 0x28 and Line by 3 to 27
\[0x.*\] Special opcode 120: advance Address by 8 to 0x34 and Line by 3 to 32
\[0x.*\] Special opcode 63: advance Address by 4 to 0x38 and Line by 2 to 34
\[0x.*\] Special opcode 120: advance Address by 8 to 0x40 and Line by 3 to 37
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x40 and Line by 2 to 39
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x40 and Line by 2 to 39 \(view 1\)
\[0x.*\] Special opcode 120: advance Address by 8 to 0x48 and Line by 3 to 42
\[0x.*\] Special opcode 63: advance Address by 4 to 0x4c and Line by 2 to 44
\[0x.*\] Advance PC by 36 to 0x70
Line Number Statements:
\[0x.*\] Extended opcode 2: set Address to 0x1
\[0x.*\] Special opcode 11: advance Address by 0 to 0x1 and Line by 6 to 7
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x1 and Line by 2 to 9
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x1 and Line by 1 to 10
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x1 and Line by 2 to 9 \(view 1\)
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x1 and Line by 1 to 10 \(view 2\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0x5 and Line by 3 to 13
\[0x.*\] Special opcode 34: advance Address by 2 to 0x7 and Line by 1 to 14
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x7 and Line by 1 to 15
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x7 and Line by 1 to 15 \(view 1\)
\[0x.*\] Special opcode 63: advance Address by 4 to 0xb and Line by 2 to 17
\[0x.*\] Advance PC by 1 to 0xc
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Special opcode 11: advance Address by 0 to 0x1 and Line by 6 to 7
\[0x.*\] Special opcode 35: advance Address by 2 to 0x3 and Line by 2 to 9
\[0x.*\] Special opcode 36: advance Address by 2 to 0x5 and Line by 3 to 12
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x5 and Line by 2 to 14
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x5 and Line by 2 to 14 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0x9 and Line by 3 to 17
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x9 and Line by 2 to 19
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x9 and Line by 2 to 19 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0xd and Line by 3 to 22
\[0x.*\] Special opcode 35: advance Address by 2 to 0xf and Line by 2 to 24
\[0x.*\] Special opcode 36: advance Address by 2 to 0x11 and Line by 3 to 27
Line Number Statements:
\[0x.*\] Extended opcode 2: set Address to 0x1
\[0x.*\] Special opcode 11: advance Address by 0 to 0x1 and Line by 6 to 7
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x1 and Line by 2 to 9
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x1 and Line by 1 to 10
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x1 and Line by 2 to 9 \(view 1\)
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x1 and Line by 1 to 10 \(view 2\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0x5 and Line by 3 to 13
\[0x.*\] Special opcode 34: advance Address by 2 to 0x7 and Line by 1 to 14
- \[0x.*\] Special opcode 6: advance Address by 0 to 0x7 and Line by 1 to 15
+ \[0x.*\] Special opcode 6: advance Address by 0 to 0x7 and Line by 1 to 15 \(view 1\)
\[0x.*\] Special opcode 35: advance Address by 2 to 0x9 and Line by 2 to 17
\[0x.*\] Advance PC by 1 to 0xa
\[0x.*\] Extended opcode 1: End of Sequence
\[0x.*\] Special opcode 11: advance Address by 0 to 0x1 and Line by 6 to 7
\[0x.*\] Special opcode 35: advance Address by 2 to 0x3 and Line by 2 to 9
\[0x.*\] Special opcode 64: advance Address by 4 to 0x7 and Line by 3 to 12
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x7 and Line by 2 to 14
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x7 and Line by 2 to 14 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0xb and Line by 3 to 17
- \[0x.*\] Special opcode 7: advance Address by 0 to 0xb and Line by 2 to 19
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0xb and Line by 2 to 19 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0xf and Line by 3 to 22
\[0x.*\] Special opcode 35: advance Address by 2 to 0x11 and Line by 2 to 24
\[0x.*\] Special opcode 64: advance Address by 4 to 0x15 and Line by 3 to 27
\[0x.*\] Special opcode 64: advance Address by 4 to 0x1b and Line by 3 to 32
\[0x.*\] Special opcode 35: advance Address by 2 to 0x1d and Line by 2 to 34
\[0x.*\] Special opcode 64: advance Address by 4 to 0x21 and Line by 3 to 37
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x21 and Line by 2 to 39
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x21 and Line by 2 to 39 \(view 1\)
\[0x.*\] Special opcode 92: advance Address by 6 to 0x27 and Line by 3 to 42
\[0x.*\] Special opcode 35: advance Address by 2 to 0x29 and Line by 2 to 44
\[0x.*\] Advance PC by 23 to 0x40
\[0x.*\] Special opcode 11: advance Address by 0 to 0x1 and Line by 6 to 7
\[0x.*\] Special opcode 35: advance Address by 2 to 0x3 and Line by 2 to 9
\[0x.*\] Special opcode 36: advance Address by 2 to 0x5 and Line by 3 to 12
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x5 and Line by 2 to 14
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x5 and Line by 2 to 14 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0x9 and Line by 3 to 17
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x9 and Line by 2 to 19
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x9 and Line by 2 to 19 \(view 1\)
\[0x.*\] Special opcode 64: advance Address by 4 to 0xd and Line by 3 to 22
\[0x.*\] Special opcode 35: advance Address by 2 to 0xf and Line by 2 to 24
\[0x.*\] Special opcode 36: advance Address by 2 to 0x11 and Line by 3 to 27
\[0x.*\] Special opcode 36: advance Address by 2 to 0x15 and Line by 3 to 32
\[0x.*\] Special opcode 35: advance Address by 2 to 0x17 and Line by 2 to 34
\[0x.*\] Special opcode 36: advance Address by 2 to 0x19 and Line by 3 to 37
- \[0x.*\] Special opcode 7: advance Address by 0 to 0x19 and Line by 2 to 39
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x19 and Line by 2 to 39 \(view 1\)
\[0x.*\] Special opcode 92: advance Address by 6 to 0x1f and Line by 3 to 42
\[0x.*\] Special opcode 35: advance Address by 2 to 0x21 and Line by 2 to 44
\[0x.*\] Advance PC by 31 to 0x40