projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use gdb_bfd_sections in dwarf2/read.c
[deliverable/binutils-gdb.git]
/
gdb
/
microblaze-tdep.c
diff --git
a/gdb/microblaze-tdep.c
b/gdb/microblaze-tdep.c
index f5035904aec2c4da6ad8a05282218488a832b515..b5da32e61b5d30e981f00a5ebc696aca096fbd07 100644
(file)
--- a/
gdb/microblaze-tdep.c
+++ b/
gdb/microblaze-tdep.c
@@
-1,6
+1,6
@@
/* Target-dependent code for Xilinx MicroBlaze.
/* Target-dependent code for Xilinx MicroBlaze.
- Copyright (C) 2009-20
18
Free Software Foundation, Inc.
+ Copyright (C) 2009-20
20
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-31,7
+31,7
@@
#include "target.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "target.h"
#include "frame-base.h"
#include "frame-unwind.h"
-#include "dwarf2
-
frame.h"
+#include "dwarf2
/
frame.h"
#include "osabi.h"
#include "target-descriptions.h"
#include "opcodes/microblaze-opcm.h"
#include "osabi.h"
#include "target-descriptions.h"
#include "opcodes/microblaze-opcm.h"
@@
-65,7
+65,7
@@
/* The registers of the Xilinx microblaze processor. */
/* The registers of the Xilinx microblaze processor. */
-static const char *microblaze_register_names[] =
+static const char *
const
microblaze_register_names[] =
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@
-353,12
+353,13
@@
microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
instruction. */
{
instruction. */
{
- unsigned op = (unsigned)insn >> 26;
+ unsigned
ctrl_
op = (unsigned)insn >> 26;
/* continue if not control flow (branch, return). */
/* continue if not control flow (branch, return). */
- if (op != 0x26 && op != 0x27 && op != 0x2d && op != 0x2e && op != 0x2f)
+ if (ctrl_op != 0x26 && ctrl_op != 0x27 && ctrl_op != 0x2d
+ && ctrl_op != 0x2e && ctrl_op != 0x2f)
continue;
continue;
- else if (op == 0x2c)
+ else if (
ctrl_
op == 0x2c)
continue; /* continue if imm. */
}
continue; /* continue if imm. */
}
@@
-573,13
+574,13
@@
microblaze_store_return_value (struct type *type, struct regcache *regcache,
{
gdb_assert (len == 8);
memcpy (buf, valbuf, 8);
{
gdb_assert (len == 8);
memcpy (buf, valbuf, 8);
- regcache
_cooked_write (regcache,
MICROBLAZE_RETVAL_REGNUM+1, buf + 4);
+ regcache
->cooked_write (
MICROBLAZE_RETVAL_REGNUM+1, buf + 4);
}
else
/* ??? Do we need to do any sign-extension here? */
memcpy (buf + 4 - len, valbuf, len);
}
else
/* ??? Do we need to do any sign-extension here? */
memcpy (buf + 4 - len, valbuf, len);
- regcache
_cooked_write (regcache,
MICROBLAZE_RETVAL_REGNUM, buf);
+ regcache
->cooked_write (
MICROBLAZE_RETVAL_REGNUM, buf);
}
static enum return_value_convention
}
static enum return_value_convention
@@
-650,7
+651,7
@@
microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
-
struct tdesc_arch_data *tdesc_data = NULL
;
+
tdesc_arch_data_up tdesc_data
;
const struct target_desc *tdesc = info.target_desc;
/* If there is already a candidate, use it. */
const struct target_desc *tdesc = info.target_desc;
/* If there is already a candidate, use it. */
@@
-675,26
+676,23
@@
microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
valid_p = 1;
for (i = 0; i < MICROBLAZE_NUM_CORE_REGS; i++)
valid_p = 1;
for (i = 0; i < MICROBLAZE_NUM_CORE_REGS; i++)
- valid_p &= tdesc_numbered_register (feature, tdesc_data, i,
+ valid_p &= tdesc_numbered_register (feature, tdesc_data
.get ()
, i,
microblaze_register_names[i]);
feature = tdesc_find_feature (tdesc,
"org.gnu.gdb.microblaze.stack-protect");
if (feature != NULL)
{
valid_p = 1;
microblaze_register_names[i]);
feature = tdesc_find_feature (tdesc,
"org.gnu.gdb.microblaze.stack-protect");
if (feature != NULL)
{
valid_p = 1;
- valid_p &= tdesc_numbered_register (feature, tdesc_data,
+ valid_p &= tdesc_numbered_register (feature, tdesc_data
.get ()
,
MICROBLAZE_SLR_REGNUM,
"rslr");
MICROBLAZE_SLR_REGNUM,
"rslr");
- valid_p &= tdesc_numbered_register (feature, tdesc_data,
+ valid_p &= tdesc_numbered_register (feature, tdesc_data
.get ()
,
MICROBLAZE_SHR_REGNUM,
"rshr");
}
if (!valid_p)
MICROBLAZE_SHR_REGNUM,
"rshr");
}
if (!valid_p)
- {
- tdesc_data_cleanup (tdesc_data);
- return NULL;
- }
+ return NULL;
}
/* Allocate space for the new architecture. */
}
/* Allocate space for the new architecture. */
@@
-747,13
+745,14
@@
microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_unwinder (gdbarch, µblaze_frame_unwind);
frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
if (tdesc_data != NULL)
frame_unwind_append_unwinder (gdbarch, µblaze_frame_unwind);
frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
if (tdesc_data != NULL)
- tdesc_use_registers (gdbarch, tdesc,
tdesc_data
);
+ tdesc_use_registers (gdbarch, tdesc,
std::move (tdesc_data)
);
return gdbarch;
}
return gdbarch;
}
+void _initialize_microblaze_tdep ();
void
void
-_initialize_microblaze_tdep (
void
)
+_initialize_microblaze_tdep ()
{
register_gdbarch_init (bfd_arch_microblaze, microblaze_gdbarch_init);
{
register_gdbarch_init (bfd_arch_microblaze, microblaze_gdbarch_init);
This page took
0.028222 seconds
and
4
git commands to generate.