Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: yao@codesourcery.com
Cc: vapier@gentoo.org, gdb-patches@sourceware.org
Subject: Re: [RFA 4/8] New port: TI C6x: Read loadmap from gdbserver
Date: Mon, 08 Aug 2011 14:01:00 -0000	[thread overview]
Message-ID: <201108081359.p78DxCkE017785@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <4E3FDEF3.5070200@codesourcery.com> (message from Yao Qi on Mon,	08 Aug 2011 21:04:51 +0800)

> Date: Mon, 08 Aug 2011 21:04:51 +0800
> From: Yao Qi <yao@codesourcery.com>
> 
> On 08/08/2011 04:28 PM, Mark Kettenis wrote:
> > Now the kernel vs. libc headers issue has always been a contentious
> > one on Linux.  But I think you should use the PTRACE_-prefixed names
> > in your code since those are the "official" Linux names, since Linux
> > was intended to be System V compatible.  The PT_-prefixed names are
> > really only for compatibility with BSD (So I don't really understand
> > why people keep adding them for ptrace(2) requests that no BSD variant
> > ever had).
> 
> Mark, thanks for pointing this out.  If we want to use PTRACE_GETDSBT
> here, we should include "asm/ptrace.h" in linux-low.c, which I am
> hesitant to do.  Current convention in linux-low.c, AFAICT, is about
> target-independent code, and so "asm/ptrace.h" is not included.  I don't
> want to break this convention to include "asm/ptrace.h", but I am not
> insist on this.  If you believe it is safe to include "asm/ptrace.h", I
> am fine with it.

Bleah.  Assuming your TI C6x system's libc headers are somewhat
similar to my amd64 system I see your problem.  The <sys/ptrace.h>
header file uses an enum for the PTRACE_XXX values, and only has
#defines for the PT_XXX values.

I think you have two choices:

1. Add a configure test for PTRACE_GETDSBT.

2. s/PTRACE_/PT_/g everywehere in your diff.

Personally I'd prefer choice #2, since we already have to many
configure checks ;).


  reply	other threads:[~2011-08-08 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20  2:09 Yao Qi
2011-07-20 14:32 ` Tom Tromey
2011-07-21  7:32   ` [RFA 9/8] New port: TI C6x: Document on qXfer:fdpic:read packet Yao Qi
2011-07-22 12:22 ` [RFA 4/8] New port: TI C6x: Read loadmap from gdbserver Mike Frysinger
2011-07-25  7:23   ` Yao Qi
2011-08-03  1:29     ` ping: " Yao Qi
2011-08-03  8:59       ` Eli Zaretskii
2011-08-08  0:30     ` Mike Frysinger
2011-08-08  2:47       ` Yao Qi
2011-08-08  8:30         ` Mark Kettenis
2011-08-08 13:05           ` Yao Qi
2011-08-08 14:01             ` Mark Kettenis [this message]
2011-08-08 13:32         ` Pedro Alves
2011-08-09  3:12           ` Yao Qi
2011-08-10 12:37             ` Mark Kettenis
2011-08-10 14:03             ` Pedro Alves
2011-08-10 14:08               ` Pedro Alves
2011-08-14 16:11                 ` [committed] " Yao Qi

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=201108081359.p78DxCkE017785@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.org \
    --cc=yao@codesourcery.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