Don't always build coffgen.o
[deliverable/binutils-gdb.git] / gdb / m32c-tdep.c
index d6bc4820cd044846b61f43a727d48ff828f7f8fe..ab123c8563065ad7e4bdc00dd4b210379e0b7e6d 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-
-#include <stdarg.h>
-
-#include <string.h>
-#include "gdb_assert.h"
 #include "elf-bfd.h"
 #include "elf/m32c.h"
 #include "gdb/sim-m32c.h"
@@ -40,6 +35,7 @@
 #include "reggroups.h"
 #include "prologue-value.h"
 #include "target.h"
+#include "objfiles.h"
 
 \f
 /* The m32c tdep structure.  */
@@ -2247,8 +2243,7 @@ m32c_return_value (struct gdbarch *gdbarch,
            error (_("The return value is stored in memory at 'mem0', "
                     "but GDB cannot find\n"
                     "its address."));
-         read_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), readbuf,
-                      valtype_len);
+         read_memory (BMSYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
        }
     }
 
@@ -2280,8 +2275,7 @@ m32c_return_value (struct gdbarch *gdbarch,
            error (_("The return value is stored in memory at 'mem0', "
                     "but GDB cannot find\n"
                     " its address."));
-         write_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), writebuf,
-                       valtype_len);
+         write_memory (BMSYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
        }
     }
 
@@ -2507,7 +2501,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
       else
        {
          /* The trampoline's address is our pointer.  */
-         addr = MSYMBOL_VALUE_ADDRESS (tramp_msym.minsym);
+         addr = BMSYMBOL_VALUE_ADDRESS (tramp_msym);
        }
     }
 
@@ -2560,7 +2554,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
               /* If we do have such a symbol, return its value as the
                  function's true address.  */
               if (func_msym.minsym)
-                ptr = MSYMBOL_VALUE_ADDRESS (func_msym.minsym);
+                ptr = BMSYMBOL_VALUE_ADDRESS (func_msym);
             }
         }
       else
This page took 0.024654 seconds and 4 git commands to generate.