]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/avr-tdep.c
start change to progspace independence
[thirdparty/binutils-gdb.git] / gdb / avr-tdep.c
index a637cf832d9bc06a443623c4e53b1f46a51c858c..6e58f045d67ddefc279fc2b2bee43d8692e0f473 100644 (file)
@@ -36,6 +36,7 @@
 #include "regcache.h"
 #include <string.h>
 #include "dis-asm.h"
+#include "objfiles.h"
 
 /* AVR Background:
 
@@ -624,8 +625,7 @@ 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.minsym)) / 2);
+      num_pushes = AVR_MAX_PUSHES - (i - BMSYMBOL_VALUE_ADDRESS (msymbol)) / 2;
 
       if (num_pushes > AVR_MAX_PUSHES)
         {