/* Target-dependent code for Morpho mt processor, for GDB.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of GDB.
#include "dis-asm.h"
#include "arch-utils.h"
#include "gdbtypes.h"
-#include "gdb_string.h"
#include "regcache.h"
#include "reggroups.h"
#include "gdbcore.h"
#include "inferior.h"
#include "dwarf2-frame.h"
#include "infcall.h"
-#include "gdb_assert.h"
#include "language.h"
#include "valprint.h"
array_names[regnum] = stub;
return stub;
}
- name = xmalloc (30);
+ name = (char *) xmalloc (30);
sprintf (name, "copro_%d_%d_%s", dim_1, dim_2, stub);
array_names[regnum] = name;
return name;
struct symbol *sym;
/* Found a function. */
- sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+ sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
{
/* Don't use this trick for assembly source files. */
regsize = register_size (gdbarch, regnum);
- buff = alloca (regsize);
- bytes = alloca (regsize * sizeof (*bytes));
+ buff = (unsigned char *) alloca (regsize);
+ bytes = XALLOCAVEC (unsigned int, regsize);
deprecated_frame_register_read (frame, regnum, buff);
gdb_byte *buf;
struct value_print_options opts;
- buf = alloca (register_size (gdbarch, MT_COPRO_REGNUM));
+ buf = (gdb_byte *) alloca (register_size (gdbarch, MT_COPRO_REGNUM));
deprecated_frame_register_read (frame, MT_COPRO_REGNUM, buf);
/* And print. */
regnum = MT_COPRO_PSEUDOREG_REGNUM;
print_spaces_filtered (15 - strlen (gdbarch_register_name
(gdbarch, regnum)),
file);
- get_raw_print_options (&opts);
+ get_no_prettyformat_print_options (&opts);
opts.deref_ref = 1;
val_print (register_type (gdbarch, regnum), buf,
0, 0, file, 0, NULL,
/* Right-justify the value in an aligned-length buffer. */
typelen = TYPE_LENGTH (value_type (args[j]));
slacklen = (wordsize - (typelen % wordsize)) % wordsize;
- val = xmalloc (typelen + slacklen);
+ val = (gdb_byte *) xmalloc (typelen + slacklen);
back_to = make_cleanup (xfree, val);
memcpy (val, contents, typelen);
memset (val + typelen, 0, slacklen);
ULONGEST sp, fp;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct mt_unwind_cache *) (*this_prologue_cache);
gdbarch = get_frame_arch (this_frame);
info = FRAME_OBSTACK_ZALLOC (struct mt_unwind_cache);
/* None found, create a new architecture from the information
provided. */
- tdep = XCALLOC (1, struct gdbarch_tdep);
+ tdep = XCNEW (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
set_gdbarch_float_format (gdbarch, floatformats_ieee_single);