]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/avr-tdep.c
use bound_minsym as result for lookup_minimal_symbol et al
[thirdparty/binutils-gdb.git] / gdb / avr-tdep.c
index da6b765dad4fa3ceb46e2c3e17f0c279394ce344..a637cf832d9bc06a443623c4e53b1f46a51c858c 100644 (file)
@@ -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)
         {