This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION
|| TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
- && DEPRECATED_USE_STRUCT_CONVENTION (0, valtype));
+ && gdbarch_deprecated_use_struct_convention
+ (current_gdbarch, 0, valtype));
if (writebuf != NULL)
{
gdb_assert (!struct_return);
/* NOTE: cagney/2004-06-13: See stack.c:return_command. Old
- architectures don't expect STORE_RETURN_VALUE to handle small
+ architectures don't expect store_return_value to handle small
structures. Should not be called with such types. */
gdb_assert (TYPE_CODE (valtype) != TYPE_CODE_STRUCT
&& TYPE_CODE (valtype) != TYPE_CODE_UNION);
- STORE_RETURN_VALUE (valtype, regcache, writebuf);
+ gdbarch_store_return_value (current_gdbarch, valtype, regcache, writebuf);
}
if (readbuf != NULL)
{
gdb_assert (!struct_return);
- EXTRACT_RETURN_VALUE (valtype, regcache, readbuf);
+ gdbarch_extract_return_value (current_gdbarch,
+ valtype, regcache, readbuf);
}
if (struct_return)
}
CORE_ADDR
-generic_skip_trampoline_code (CORE_ADDR pc)
+generic_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
return 0;
}
}
/* Legacy version of target_virtual_frame_pointer(). Assumes that
- there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or
+ there is an gdbarch_deprecated_fp_regnum and that it is the same, cooked or
raw. */
void
register and an offset can determine this. I think it should
instead generate a byte code expression as that would work better
with things like Dwarf2's CFI. */
- if (DEPRECATED_FP_REGNUM >= 0
- && DEPRECATED_FP_REGNUM < gdbarch_num_regs (current_gdbarch))
- *frame_regnum = DEPRECATED_FP_REGNUM;
- else if (SP_REGNUM >= 0 && SP_REGNUM < gdbarch_num_regs (current_gdbarch))
- *frame_regnum = SP_REGNUM;
+ if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0
+ && gdbarch_deprecated_fp_regnum (current_gdbarch)
+ < gdbarch_num_regs (current_gdbarch))
+ *frame_regnum = gdbarch_deprecated_fp_regnum (current_gdbarch);
+ else if (gdbarch_sp_regnum (current_gdbarch) >= 0
+ && gdbarch_sp_regnum (current_gdbarch)
+ < gdbarch_num_regs (current_gdbarch))
+ *frame_regnum = gdbarch_sp_regnum (current_gdbarch);
else
/* Should this be an internal error? I guess so, it is reflecting
an architectural limitation in the current design. */
struct cmd_list_element *c, const char *value)
{
const char *arch;
- arch = TARGET_ARCHITECTURE->printable_name;
+ arch = gdbarch_bfd_arch_info (current_gdbarch)->printable_name;
if (target_architecture_user == NULL)
fprintf_filtered (file, _("\
The target architecture is set automatically (currently %s)\n"), arch);
/* Check for the current file. */
if (info->abfd == NULL)
info->abfd = exec_bfd;
+ if (info->abfd == NULL)
+ info->abfd = core_bfd;
/* Check for the current target description. */
if (info->target_desc == NULL)