Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.

Kamil Rytarowski <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 05.09.2017 13:18, John Baldwin wrote:
> On 9/5/17 4:48 AM, Kamil Rytarowski wrote:
>> On 05.09.2017 04:43, John Baldwin wrote:
>>> -/* Not all versions of FreeBSD/i386 that support the debug registers
>>> -   have this macro.  */
>>> +/* Helper macro to access debug register X.  FreeBSD/amd64 and modern
>>> +   versions of FreeBSD/i386 provide this macro in system headers.  Define
>>> +   a local version for systems that do not provide it.  */
>>>  #ifndef DBREG_DRX
>>> +#ifdef __NetBSD__
>>> +#define DBREG_DRX(d, x) ((d)->dr[x])
>>> +#else
>>>  #define DBREG_DRX(d, x) ((&d->dr0)[x])
>>>  #endif
>>> +#endif
>>>  
>>>  static unsigned long
>>>  x86bsd_dr_get (ptid_t ptid, int regnum)
>>>
>>
>> Do we support FreeBSD releases developed in year 2002? This macro has
>> point for such old systems as it keeps compat between old and new
>> structure layout.
> 
> I have been trimming some older things from GDB master such as support for bsd-uthread
> and FreeBSD/alpha.  However, keeping a fallback for this macro doesn't seem to be overly
> onerous or inhibiting maintenance currently.
> 

I will submit a patch to refactor it out, however in future.

Right now I keep upstreaming patches to make GDB cleanly buildable.

I've attached a NetBSD buildbot again:

https://gdb-build.sergiodj.net/builders/NetBSD-x86_64-m64

I'm working on patches to sort out all the issues.
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZrxxAAAoJEEuzCOmwLnZsy0gQAMBslj+nr0+0tURxOqKxQhQ6
SE3qWz4O2HWVR0lsZBrJY4c1TaQEpglP1BwFiaKnBTaU3UZVEMDdpT6vPAUfrXB+
GjRsE9ORegrLhH/F0NaIVaitD1a3BxcrcKk8ctBT5ZjY+Ajj270d4C576eYTdSkf
u64Mq/rz2SjNHakLkeKIwIYDPXO7OTo6EGMoior+YkRJYRZRuQmCPXxCWyYYFv6Q
oQ7V3b/YaI8BctY3h/M96Ex+iDcG1iqsWZmgE0kGLJYxZXNGdf607TczXjV6GoVD
DjiAxRICkD/2BgGhvIEMmcVMKUo+lgPpFV3v1+fEPcUhXty0kuy4YprYViX9CMHT
epN8/gLWGbuzDF2RK5A/WlaWlFTYgHJTh/LBXUuFIlUMcU5lmcIH6WBS0sI4NwAI
M7kQIuSsZG98uiBMM0nfT+QM585u+bPdeui2iub07zDbL8qsAk4P3ykTmhRBdNUq
aJAtIWLFOGIszhWeQQ9nXJha0W+zxgPF5MihWYCx4yNTkAdGVGm9jIXt9tUXxOby
4kzZntHNwmM8MQ300zk3RVDs5Y/TclOArmA7LaQbCEDtB4PYWpJaVW1SzmbejDXN
2oFRVnb4f1dxpF1RpYdsKksugIWddNaiggNwTIycOy5I6ZU+b8OOVaUFVehhIugE
lYwgD7gcLeM1+fIU3utC
=F2Vd
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.