/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright (C) 1998-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2014 Free Software Foundation, Inc.
This file is part of GDB.
#include "buildsym.h"
#include "gdbcmd.h"
#include "inferior.h" /* enum CALL_DUMMY_LOCATION et al. */
-#include "gdb_string.h"
+#include <string.h>
#include "regcache.h"
#include "gdb_assert.h"
#include "sim-regno.h"
#include "osabi.h"
#include "target-descriptions.h"
#include "objfiles.h"
+#include "language.h"
#include "version.h"
}
/* Try to select a global architecture that matches "info". Return
- non-zero if the attempt succeds. */
+ non-zero if the attempt succeeds. */
int
gdbarch_update_p (struct gdbarch_info info)
{
/* If it is the same old architecture, accept the request (but don't
swap anything). */
- if (new_gdbarch == target_gdbarch)
+ if (new_gdbarch == target_gdbarch ())
{
if (gdbarch_debug)
fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: "
"New architecture %s (%s) selected\n",
host_address_to_string (new_gdbarch),
gdbarch_bfd_arch_info (new_gdbarch)->printable_name);
- deprecated_target_gdbarch_select_hack (new_gdbarch);
+ set_target_gdbarch (new_gdbarch);
return 1;
}
if (gdbarch == NULL)
error (_("Architecture of file not recognized."));
- deprecated_target_gdbarch_select_hack (gdbarch);
+ set_target_gdbarch (gdbarch);
}
/* Initialize the current architecture. Update the ``set
if (has_stack_frames ())
return get_frame_arch (get_selected_frame (NULL));
else
- return target_gdbarch;
+ return target_gdbarch ();
}
int
error (_("This architecture has no method to collect a return address."));
}
-enum gdb_signal
-default_gdb_signal_from_host (struct gdbarch *gdbarch, int signo)
+int
+default_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
+ struct type *type)
{
- return gdb_signal_from_host (signo);
+ /* Usually, the return value's address is stored the in the "first hidden"
+ parameter if the return value should be passed by reference, as
+ specified in ABI. */
+ return language_pass_by_reference (type);
}
/* */