Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: John Baldwin <jhb@FreeBSD.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] x86-bsd-nat: Only define gdb_ptrace when using debug registers.
Date: Mon, 26 Jul 2021 21:20:53 -0400	[thread overview]
Message-ID: <b5a3e818-8f32-9980-2d1b-d342ff8c0f61@polymtl.ca> (raw)
In-Reply-To: <20210727002421.18947-3-jhb@FreeBSD.org>

On 2021-07-26 8:24 p.m., John Baldwin wrote:
> This fixes an unused function warning on OpenBSD which does not
> support PT_GETDBREGS.
> ---
>  gdb/x86-bsd-nat.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
> index 453fc44116..6aac76f182 100644
> --- a/gdb/x86-bsd-nat.c
> +++ b/gdb/x86-bsd-nat.c
> @@ -33,6 +33,14 @@
>  #include "inf-ptrace.h"
>  \f
>  
> +#ifdef PT_GETXSTATE_INFO
> +size_t x86bsd_xsave_len;
> +#endif
> +
> +/* Support for debug registers.  */
> +
> +#ifdef HAVE_PT_GETDBREGS
> +
>  static PTRACE_TYPE_RET
>  gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
>  {
> @@ -46,14 +54,6 @@ gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
>  #endif
>  }
>  
> -#ifdef PT_GETXSTATE_INFO
> -size_t x86bsd_xsave_len;
> -#endif
> -
> -/* Support for debug registers.  */
> -
> -#ifdef HAVE_PT_GETDBREGS
> -
>  /* 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.  */
> 


OK.

Simon

  reply	other threads:[~2021-07-27  1:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  0:24 [PATCH 0/3] A few fixes to OpenBSD's native target John Baldwin
2021-07-27  0:24 ` [PATCH 1/3] Don't compile x86 debug register support on OpenBSD John Baldwin
2021-07-27  1:19   ` Simon Marchi via Gdb-patches
2021-07-27  0:24 ` [PATCH 2/3] x86-bsd-nat: Only define gdb_ptrace when using debug registers John Baldwin
2021-07-27  1:20   ` Simon Marchi via Gdb-patches [this message]
2021-07-27  0:24 ` [PATCH 3/3] obsd-nat: Various fixes to obsd_nat_target::wait John Baldwin
2021-07-27  1:54   ` Simon Marchi via Gdb-patches
2021-07-27 16:03     ` John Baldwin

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=b5a3e818-8f32-9980-2d1b-d342ff8c0f61@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=simon.marchi@polymtl.ca \
    /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