public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix fail in gdb.server/wrapper.exp
Date: Tue, 14 Jul 2015 12:50:00 -0000	[thread overview]
Message-ID: <55A5057D.6000500@redhat.com> (raw)
In-Reply-To: <1436877481-11495-1-git-send-email-yao.qi@linaro.org>

On 07/14/2015 01:38 PM, Yao Qi wrote:
> We are testing i686-linux GDB (Fedora-i686) on an x86_64-linux box
> (fedora-x86-64-4) in buildbot, such configuration causes fails in
> gdb.server/wrapper.exp like this:
> 
> spawn /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/../../gdb/gdbserver/gdbserver --once --wrapper env TEST=1 -- :2346 /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/outputs/gdb.server/wrapper/wrapper
> Process /home/gdb-buildbot-2/fedora-x86-64-4/fedora-i686/build/gdb/testsuite/outputs/gdb.server/wrapper/wrapper created; pid = 8795
> Can't debug 64-bit process with 32-bit GDBserver
> Exiting
> target remote localhost:2346
> localhost:2346: Connection timed out.
> (gdb) FAIL: gdb.server/wrapper.exp: setting breakpoint at marker
> 
> See https://sourceware.org/ml/gdb-testers/2015-q3/msg01541.html
> 
> I can reproduce this fail on my ubuntu box as well.  "wrapper" is
> 32-bit, but when GDBserver option --wrapper is used, the wrapper
> program is executed to launch the program, and the wrapper is
> /usr/bin/env in this case.  In
> gdbserver/linux-x86-low.c:x86_linux_read_description, GDBserver
> checks whether the executable is 64-bit or not by means of
> /proc/PID/exe, which is the symbol-link to the wrapper, instead
> of the test program.  Since 32-bit GDBserver is being used, it
> refuse to debug 64-bit process (/usr/bin/env) and exit.

But why is gdbserver trying to compute a target description for /usr/bin/env?
That's not the target process.  We shouldn't try to read registers,
memory, etc. out of it, just like native gdb doesn't read anything
out of the shell process, and I assume, of
the "set exec-wrapper" process.

Thanks,
Pedro Alves

  reply	other threads:[~2015-07-14 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 12:38 Yao Qi
2015-07-14 12:50 ` Pedro Alves [this message]
2015-07-14 13:37   ` Yao Qi
2015-07-14 14:53     ` 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=55A5057D.6000500@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).