Namespace the reg class to avoid clashes with OS headers
authorKamil Rytarowski <n54@gmx.com>
Tue, 17 Mar 2020 13:38:23 +0000 (14:38 +0100)
committerKamil Rytarowski <n54@gmx.com>
Wed, 18 Mar 2020 02:36:25 +0000 (03:36 +0100)
commit5a82b8a12b6a9b8167517ab1df1dcdcc4711ffda
tree9efbd9f8a6b74b3cc36ce38a04e7e92bea65dcbb
parentfb516a69133999df3e30fccb7c4f5759eb1090eb
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.
gdb/ChangeLog
gdb/regformats/regdef.h
gdbserver/ChangeLog
gdbserver/regcache.cc
gdbserver/tdesc.cc
gdbserver/tdesc.h