aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/regformats/regdef.h4
-rw-r--r--gdbserver/ChangeLog6
-rw-r--r--gdbserver/regcache.cc2
-rw-r--r--gdbserver/tdesc.cc2
-rw-r--r--gdbserver/tdesc.h2
6 files changed, 17 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a89267f..84964dc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-03-17 Kamil Rytarowski <n54@gmx.com>
+ * regformats/regdef.h: Put reg in gdb namespace.
+
+2020-03-17 Kamil Rytarowski <n54@gmx.com>
+
* i386-bsd-nat.c (gdb_ptrace): New.
* (i386bsd_fetch_inferior_registers,
i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
diff --git a/gdb/regformats/regdef.h b/gdb/regformats/regdef.h
index 340281e..ed9aeb7 100644
--- a/gdb/regformats/regdef.h
+++ b/gdb/regformats/regdef.h
@@ -19,6 +19,8 @@
#ifndef REGFORMATS_REGDEF_H
#define REGFORMATS_REGDEF_H
+namespace gdb {
+
struct reg
{
reg (int _offset)
@@ -60,4 +62,6 @@ struct reg
}
};
+} /* namespace gdb */
+
#endif /* REGFORMATS_REGDEF_H */
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 5c3761a..ea8a079 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-17 Kamil Rytarowski <n54@gmx.com>
+
+ * regcache.cc (find_register_by_number): Update.
+ * tdesc.cc (init_target_desc): Likewise.
+ * tdesc.h (target_desc::reg_defs): Likewise.
+
2020-03-12 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
diff --git a/gdbserver/regcache.cc b/gdbserver/regcache.cc
index 33d3887..6c0af95 100644
--- a/gdbserver/regcache.cc
+++ b/gdbserver/regcache.cc
@@ -198,7 +198,7 @@ regcache_cpy (struct regcache *dst, struct regcache *src)
/* Return a reference to the description of register N. */
-static const struct reg &
+static const struct gdb::reg &
find_register_by_number (const struct target_desc *tdesc, int n)
{
return tdesc->reg_defs[n];
diff --git a/gdbserver/tdesc.cc b/gdbserver/tdesc.cc
index de25e7c..8d97def 100644
--- a/gdbserver/tdesc.cc
+++ b/gdbserver/tdesc.cc
@@ -75,7 +75,7 @@ init_target_desc (struct target_desc *tdesc,
gdb_assert (regnum == 0 || regnum >= tdesc->reg_defs.size ());
if (regnum != 0)
- tdesc->reg_defs.resize (regnum, reg (offset));
+ tdesc->reg_defs.resize (regnum, gdb::reg (offset));
tdesc->reg_defs.emplace_back (treg->name.c_str (), offset,
treg->bitsize);
diff --git a/gdbserver/tdesc.h b/gdbserver/tdesc.h
index 5e0df85..f9ca478 100644
--- a/gdbserver/tdesc.h
+++ b/gdbserver/tdesc.h
@@ -31,7 +31,7 @@ struct target_desc : tdesc_element
{
/* A vector of elements of register definitions that
describe the inferior's register set. */
- std::vector<struct reg> reg_defs;
+ std::vector<struct gdb::reg> reg_defs;
/* The register cache size, in bytes. */
int registers_size;