From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25671 invoked by alias); 30 Oct 2014 12:32:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25654 invoked by uid 89); 30 Oct 2014 12:32:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: dancol.org Received: from dancol.org (HELO dancol.org) (96.126.100.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 30 Oct 2014 12:32:52 +0000 Received: from [81.168.70.173] (helo=[192.168.1.10]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1XjouI-0003VS-3z; Thu, 30 Oct 2014 05:32:51 -0700 Message-ID: <54522FE0.9050508@dancol.org> Date: Thu, 30 Oct 2014 12:32:00 -0000 From: Daniel Colascione User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] Warn users about mismatched PID namespaces References: <5451AB7E.40709@dancol.org> <54522DC7.2090100@redhat.com> In-Reply-To: <54522DC7.2090100@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9tOWT1BAHKOfWavBoW5AJJLCPGRXuL5iw" X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00844.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9tOWT1BAHKOfWavBoW5AJJLCPGRXuL5iw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 907 On 10/30/2014 12:23 PM, Pedro Alves wrote: > On 10/30/2014 03:07 AM, Daniel Colascione wrote: >=20 >> diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c >> index 352fac1..4089417 100644 >> - --- a/gdb/linux-thread-db.c >> +++ b/gdb/linux-thread-db.c >> @@ -1223,6 +1223,25 @@ thread_db_new_objfile (struct objfile *objfile) >> static void >> thread_db_inferior_created (struct target_ops *target, int from_tty) >> { >> + /* If the child is in a different PID namespace, its idea of its PID >> + will differ from our idea of its PID. When we scan the child's >> + thread list, we'll mistakenly think it has no threads since the >> + thread PID fields won't match the PID we give to >> + libthread_db. */ >=20 > Why not give libthread_db the right PID then? How do you suggest find it? There's some talk on LKML of adding the necessa= ry system call, but it's not in-tree yet. --9tOWT1BAHKOfWavBoW5AJJLCPGRXuL5iw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUUi/gAAoJEN4WImmbpWBlr0IP/1JpHjuUhyv1ncYDqOzB0T9x k4lLormsJBB8Stx3QCbDeNaa/DtJVs7CtC5DxmDYTji4TN7gM9SsgwBMSEPflEkY J4BAxUEQJRUSvXXxQ0oIENiQiBqYk4VHCW3HcYsn/jr+WkoHF5jALfheujZGVBIN ORyWpdidXdVSjl75DWuzy1ZEqE2rlCg5izC/8eq1EqtVlsjzQ9PQyJmu73y6LgJk Zh3mWyQPz8Hymgp6nSnmHdfgPcRD69fYCn2z48GJYlQF/tHTtY2PYGk/TcXTs9Oe +f35FgfhoQZbRDrXFUR0a0B88jWWMWQFJN11bY1AHxcGF/RT0uM/AD5PK/IGQNPB xJ7VFRIq8bmo7qWnCOkuuiHXZyIgcrYo6IECSubZR1KFGTl1QNs4vcd6dPAQrueO tPzd248R/trpLfj5XDNnFULGwMYzIe+dZD/2cLKBjuwMzjldhKu25uhMAKSv9mnv Ckv+xL0KwxinxvpXHZUJCRUcCnOL56RH7op5Zhp8nNaQYHd0h8Xp9eorMjN0yQzy fL+EjDnMxyxrsxpy9DucqwHiauLKMtrBuxnQnv1goFGByaid1qaRrsty7Sw2JltN 7cnznqE7l/y+KgVBYBeieEo9qTICr9TvKvMpqruBC1G1kZX7RONe3wfQjIbKp4Z6 OG9uP3JTXaOUTDIo3ITl =Ague -----END PGP SIGNATURE----- --9tOWT1BAHKOfWavBoW5AJJLCPGRXuL5iw--