From: Luis Machado <lgustavo@codesourcery.com>
To: Matthias Pfaller <leo@marco.de>, GDB <gdb@sourceware.org>
Subject: Re: [bug?] [patch] target remote and multiprocess+
Date: Wed, 23 Nov 2016 15:45:00 -0000 [thread overview]
Message-ID: <cd9d15a1-4375-bb6f-861d-9cca7d4c1350@codesourcery.com> (raw)
In-Reply-To: <58355990.3000002@marco.de>
Hi,
On 11/23/2016 02:55 AM, Matthias Pfaller wrote:
> To make sure I'm not totally wrong I did run an (unpatched) gdbserver
> (7.11.1) -multi on my host machine. Then I connected with
> extended-remote and created two inferiors. After a disconnect and a
> reconnect gdbserver responds with the following inferior/thread list:
>
> l<threads>\n<thread id="p29ae.29ae" core="3" name="xterm"/>\n<thread
> id="p3dcf.3dcf" core="1" name="xterm"/>\n</threads>\n
>
> But doing a "info inferiors" will show:
> (gdb) info inferiors
> Num Description Executable
> * 1 process 15823 /usr/uti/xterm
>
> and info threads:
> (gdb) info threads
> Sending packet: $qXfer:threads:read::0,fff#03...Packet received:
> l<threads>\n<thread id="p29ae.29ae" core="3" name="xterm"/>\n<thread
> id="p3dcf.3dcf" core="1" name="xterm"/>\n</threads>\n
> Id Target Id Frame
> 1 Thread 10670.10670 "xterm"
> ../../gdb/thread.c:1447: internal-error: switch_to_thread: Assertion
> `inf != NULL' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)
>
> (note that this is the host system's gdb 7.11.1)
> So attaching to a target with multiple running inferiors just doesn't
> work at the moment.
>
> Now I tried with gdb-7.12 and my patches applied:
>
> (gdb) set non-stop on
> (gdb) target remote localhost:29979
> Remote debugging using localhost:29979
> Reading /usr/uti/xterm from remote target...
> warning: File transfers from remote targets can be slow. Use "set
> sysroot" to access files locally instead.
> Reading /usr/uti/xterm from remote target...
> Reading symbols from target:/usr/uti/xterm...(no debugging symbols
> found)...done.
> Python Exception <type 'exceptions.NameError'> Installation error:
> gdb.execute_unwinders function is missing:
>
> Thread 1.1 "xterm" stopped.
> 0x00007ffff7ddac80 in ?? ()
> Python Exception <type 'exceptions.NameError'> Installation error:
> gdb.execute_unwinders function is missing:
>
> Thread 2.1 "xterm" stopped.
> 0x00007ffff7ddac80 in ?? ()
> (gdb) info threads
> Id Target Id Frame
> 1.1 Thread 10670.10670 "xterm" Python Exception <type
> 'exceptions.NameError'> Installation error: gdb.execute_unwinders
> function is missing:
> 0x00007ffff7ddac80 in ?? ()
> * 2.1 Thread 15823.15823 "xterm" Python Exception <type
> 'exceptions.NameError'> Installation error: gdb.execute_unwinders
> function is missing:
> 0x00007ffff7ddac80 in ?? ()
> (gdb) info inferiors
> Num Description Executable
> 1 process 10670 target:/usr/uti/xterm
> * 2 process 15823 target:/usr/uti/xterm
>
> So I think this is at least not worse than what gdb was doing before...
> Is there a chance to get this patch into gdb?
>
> Matthias
>
I think i misunderstood your initial explanation. So the patch in
questions attempts to fix the internal error plus the fact that GDB
doesn't show more than one inferior when connecting to a gdbserver that
is controlling multiple inferiors?
If so, indeed it is a bug and i still see it on master GDB. I'd send the
patch to gdb-patches so we can properly review it.
Also, did you run the gdb testsuite to make sure your patch did not
introduce regressions comparing against the unpatch gdb testsuite run?
You can run the testsuite like this:
make check-gdb (top-level) or make-gdb
You should also run the testsuite against gdbserver like this:
make check-gdb RUNTESTFLAGS="--target_board native-gdbserver"
next prev parent reply other threads:[~2016-11-23 15:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 12:32 Matthias Pfaller
2016-11-21 16:27 ` Luis Machado
2016-11-22 7:17 ` Matthias Pfaller
2016-11-23 8:55 ` Matthias Pfaller
2016-11-23 15:45 ` Luis Machado [this message]
2016-11-28 9:24 ` Matthias Pfaller
2016-11-28 16:07 ` Luis Machado
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=cd9d15a1-4375-bb6f-861d-9cca7d4c1350@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=leo@marco.de \
/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