From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12431 invoked by alias); 30 Oct 2014 12:51: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 12420 invoked by uid 89); 30 Oct 2014 12:51: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:51: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 1XjpCg-0003bA-Kr; Thu, 30 Oct 2014 05:51:51 -0700 Message-ID: <5452345D.4040601@dancol.org> Date: Thu, 30 Oct 2014 12:51: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> <54522FE0.9050508@dancol.org> <545233C8.4070402@redhat.com> In-Reply-To: <545233C8.4070402@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BfnPD02MDRw4cmrptBqAedW0nfpgfMBe5" X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00846.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BfnPD02MDRw4cmrptBqAedW0nfpgfMBe5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1207 On 10/30/2014 12:49 PM, Pedro Alves wrote: > On 10/30/2014 12:32 PM, Daniel Colascione wrote: >> On 10/30/2014 12:23 PM, Pedro Alves wrote: >>> On 10/30/2014 03:07 AM, Daniel Colascione wrote: >>> >>>> 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. */ >>> >>> Why not give libthread_db the right PID then? >> >> How do you suggest find it?=20 >=20 > Isn't it visible somewhere in /proc ? Not AFAICT, but maybe I overlooked something. >=20 >> There's some talk on LKML of adding the necessary system call, but it's = not in-tree yet. >=20 > Do you have a url handy? https://lwn.net/Articles/602987/ --BfnPD02MDRw4cmrptBqAedW0nfpgfMBe5 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 iQIcBAEBCAAGBQJUUjRdAAoJEN4WImmbpWBlPmoQAIOXXPRZ8swsa/gsNbqKfw9c UXbCl6U6YQnHLxPk9V/q5+9MWSZ/O0JfD6dJ5+nrXyNuGb+Bj+XrlwbKgCxtjfP+ 0avAl5VDN4QtG427EQZxGHKJWM6OhLG56KCubRshCm3b4SiR5BMbQi2NJEmvCTiv kP1R1A/LYmsWCmhPG04NhrCgBNORm8i8s/JYzCNQi/HeQpyHcbgfKVCZbwC88xkS vezKLHGiYxWTapR9DnrYYv8Z400zcKfB3mtGpQMBfSczRm8qzuAqX59n3LUfuKrP /mywlTRKV9dvhvnhTJvPsn8CI8r/xawpeGgB3D2G5hHl1wp5bjQfXNK5xhvGHi+X RUbazFP04pCpATnCvAj/RI7DaGNzmGbqskKo2TXPZZXNurkNGUTGxtqtz9NZ6+bS zcoOKh5uXHTKijpgWYNV2FcF3hvY7jBR5ORXuq7TGb98u3/92OGUx1Jc8dZG5HqH bfq953b0Fo4TkEUjiIh3jPER7y4+hpDX47esey8en087Uw4Dkx6NT1TGV+kY6A5c wivpYrB3wbADqBv6LfnzHcgcbIGVS8mI8koSOFPLSE+jG30RIkwgA9xXne2+w+Ek JUbkBmRHuyeR0NALiBbgEKRrx+H0ogAW0QNghJ21xFTVUw0jWjTp0+PwtLcmeXwe uiSMVB+uUIcYbql7RDhh =DqR3 -----END PGP SIGNATURE----- --BfnPD02MDRw4cmrptBqAedW0nfpgfMBe5--