aboutsummaryrefslogtreecommitdiff
path: root/gdb/csky-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-05-18 09:49:35 -0600
committerTom Tromey <tromey@adacore.com>2022-06-02 09:04:45 -0600
commit0fecb1a78491d3d090c05b868a970a571688f66e (patch)
treea04a330fcfafbc26c0ad3ee883829e1a34eb929a /gdb/csky-tdep.c
parentcc55e4ef62f102c4aff3b34ee2a134cdcc734897 (diff)
downloadgdb-0fecb1a78491d3d090c05b868a970a571688f66e.zip
gdb-0fecb1a78491d3d090c05b868a970a571688f66e.tar.gz
gdb-0fecb1a78491d3d090c05b868a970a571688f66e.tar.bz2
ODR warning for "struct stack_item"
"struct stack_item" is defined in multiple .c files, causing ODR warnings. This patch renames these types. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Diffstat (limited to 'gdb/csky-tdep.c')
-rw-r--r--gdb/csky-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index 633a87a..3b4db04 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -307,9 +307,9 @@ csky_register_type (struct gdbarch *gdbarch, int reg_nr)
/* Data structure to marshall items in a dummy stack frame when
calling a function in the inferior. */
-struct stack_item
+struct csky_stack_item
{
- stack_item (int len_, const gdb_byte *data_)
+ csky_stack_item (int len_, const gdb_byte *data_)
: len (len_), data (data_)
{}
@@ -330,7 +330,7 @@ csky_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
int argreg = CSKY_ABI_A0_REGNUM;
int last_arg_regnum = CSKY_ABI_LAST_ARG_REGNUM;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- std::vector<stack_item> stack_items;
+ std::vector<csky_stack_item> stack_items;
/* Set the return address. For CSKY, the return breakpoint is
always at BP_ADDR. */
@@ -406,7 +406,7 @@ csky_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Transfer the dummy stack frame to the target. */
- std::vector<stack_item>::reverse_iterator iter;
+ std::vector<csky_stack_item>::reverse_iterator iter;
for (iter = stack_items.rbegin (); iter != stack_items.rend (); ++iter)
{
sp -= iter->len;