diff options
author | Kamil Rytarowski <n54@gmx.com> | 2020-03-17 14:38:23 +0100 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2020-03-18 03:36:25 +0100 |
commit | 5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda (patch) | |
tree | 9efbd9f8a6b74b3cc36ce38a04e7e92bea65dcbb /gdb | |
parent | fb516a69133999df3e30fccb7c4f5759eb1090eb (diff) | |
download | gdb-5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda.zip gdb-5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda.tar.gz gdb-5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda.tar.bz2 |
Namespace the reg class to avoid clashes with OS headers
Fix build issues on NetBSD where the reg symbol exists in public headers.
regformats/regdef.h:22:8: error: redefinition struct
struct reg
^~~
/usr/include/amd64/reg.h:51:8: note: previous definition struct
struct reg {
^~~
gdb/ChangeLog:
* regformats/regdef.h: Put reg in gdb namespace.
gdbserver/ChangeLog:
* regcache.cc (find_register_by_number): Update.
* tdesc.cc (init_target_desc): Likewise.
* tdesc.h (target_desc::reg_defs): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/regformats/regdef.h | 4 |
2 files changed, 8 insertions, 0 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 */ |