public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GDB <gdb@sourceware.org>
Subject: Bad ptrace test in gdb/configure.ac
Date: Thu, 16 Feb 2012 19:23:00 -0000	[thread overview]
Message-ID: <CAMe9rOqbpY5NSZ9_=u91XCdm+A62Rd1N3N_sLebwn4bgduesqg@mail.gmail.com> (raw)

gdb/configure.ac has

# Check return type.  Varargs (used on GNU/Linux) conflict with the
# empty argument list, so check for that explicitly.
AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
  AC_TRY_COMPILE($gdb_ptrace_headers,
    [extern long ptrace (enum __ptrace_request, ...);],
    gdb_cv_func_ptrace_ret='long',
    AC_TRY_COMPILE($gdb_ptrace_headers,
      [extern int ptrace ();],
      gdb_cv_func_ptrace_ret='int',
      gdb_cv_func_ptrace_ret='long')))
AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
  [Define as the return type of ptrace.])
# Check argument types.
AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
  AC_TRY_COMPILE($gdb_ptrace_headers,
    [extern long ptrace (enum __ptrace_request, ...);],
    [gdb_cv_func_ptrace_args='int,int,long,long'],[

It first detects the return type of ptrace.  Right after that, it uses
long as return
type for ptrace when detecting its arguments.  I think it should use

[extern $gdb_cv_func_ptrace_ret ptrace (enum __ptrace_request, ...);],

instead of

[extern long ptrace (enum __ptrace_request, ...);],


-- 
H.J.

             reply	other threads:[~2012-02-16 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 19:23 H.J. Lu [this message]
2012-03-08 15:13 ` Pedro Alves

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='CAMe9rOqbpY5NSZ9_=u91XCdm+A62Rd1N3N_sLebwn4bgduesqg@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).