diff options
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r-- | gdb/avr-tdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index da6b765..a637cf8 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -492,7 +492,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end, int i; unsigned short insn; int scan_stage = 0; - struct minimal_symbol *msymbol; + struct bound_minimal_symbol msymbol; unsigned char prologue[AVR_MAX_PROLOGUE_SIZE]; int vpc = 0; int len; @@ -586,7 +586,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end, pc_offset += 2; msymbol = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL); - if (!msymbol) + if (!msymbol.minsym) break; insn = extract_unsigned_integer (&prologue[vpc + 8], 2, byte_order); @@ -624,7 +624,8 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end, /* Resolve offset (in words) from __prologue_saves__ symbol. Which is a pushes count in `-mcall-prologues' mode */ - num_pushes = AVR_MAX_PUSHES - (i - MSYMBOL_VALUE_ADDRESS (msymbol)) / 2; + num_pushes = (AVR_MAX_PUSHES + - (i - MSYMBOL_VALUE_ADDRESS (msymbol.minsym)) / 2); if (num_pushes > AVR_MAX_PUSHES) { |