Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Kamil Rytarowski <n54@gmx.com>
Cc: gdb@sourceware.org, coypu@sdf.org
Subject: Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.
Date: Tue, 05 Sep 2017 11:19:00 -0000	[thread overview]
Message-ID: <7b23e1a8-c303-f9f8-3180-9af30a3fb25e@FreeBSD.org> (raw)
In-Reply-To: <53223a37-4aee-76f1-4b5e-131f52cafab0@gmx.com>

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.

-- 
John Baldwin


  reply	other threads:[~2017-09-05 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170905024337.88051.qmail@sourceware.org>
2017-09-05  8:58 ` Kamil Rytarowski
2017-09-05 11:19   ` John Baldwin [this message]
2017-09-05 21:48     ` Kamil Rytarowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b23e1a8-c303-f9f8-3180-9af30a3fb25e@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=coypu@sdf.org \
    --cc=gdb@sourceware.org \
    --cc=n54@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox