From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107303 invoked by alias); 7 Jun 2015 12:03:19 -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 107248 invoked by uid 89); 7 Jun 2015 12:03:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailrelay110.isp.belgacom.be Received: from mailrelay110.isp.belgacom.be (HELO mailrelay110.isp.belgacom.be) (195.238.20.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 07 Jun 2015 12:03:17 +0000 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=eWtaKQUTUbzTvYESxgzcVvJXO5dQmjbJ/tTWSlQWV0k= c=1 sm=2 a=IkcTkHD0fZMA:10 a=04sf1XYzzPoMDyCLaW0A:9 a=QEXdDO2ut3YA:10 a=HkbylbZUc0CfiV7u:21 a=qACALpj5tYKZqQxq:21 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CrAQBqMXRV/xSZgW0NT4dgwF6CVQKBYQEBAQEBAYUuAQEEI1YQCw4KAgImAgJXBohFq2twozoBAQEBAQEBAQIBAQEBHoEhiiKFBgeCaIFFBbY1gQWDGIM0AQEB Received: from 20.153-129-109.adsl-dyn.isp.belgacom.be (HELO [192.168.1.11]) ([109.129.153.20]) by relay.skynet.be with ESMTP; 07 Jun 2015 14:03:05 +0200 Subject: Re: [PATCH v2] Make only user-specified executable and symbol filenames sticky From: Philippe Waroquiers To: Gary Benson Cc: gdb-patches@sourceware.org, Pedro Alves , Joel Brobecker , Doug Evans , Don Breazeal In-Reply-To: <1433503346-22517-1-git-send-email-gbenson@redhat.com> References: <20150603172339.GA24958@adacore.com> <1433503346-22517-1-git-send-email-gbenson@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 07 Jun 2015 12:03:00 -0000 Message-ID: <1433678617.2933.34.camel@soleil> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00093.txt.bz2 On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote: > Built and regtested on RHEL6.6 x86_64. I also tested the patch (unmodified, i.e. keeping the !fake_pid_p test) with 'native' attach/detach. I have encountered some problems. Here is the test I am doing: In one terminal, I launch /bin/sleep 10000 In another terminal, I am launching ./gdbserver_tests/sleepers 1000000 1000000 1000000 BSBSBSBS (sleepers is a program used for testing Valgrind gdbsrv). Then I used the patched GDB to attach first to sleep, then detach, then attach to sleepers, then detach, then attach again to sleep. The 3 attach does not work properly: it believes it has to use the sleepers executable, asks to switch to this symbol file, and then GDB locks, and I have to kill it. Philippe (gdb) atta 27434 Attaching to process 27434 Reading symbols from /bin/sleep...(no debugging symbols found)...done. warning: Cannot call inferior functions on this system - Linux kernel with broken i386 NX (non-executable pages) support detected! Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. 0x00dab416 in __kernel_vsyscall () (gdb) detach Detaching from program: /bin/sleep, process 27434 (gdb) attach 27393 Attaching to program: /bin/sleep, process 27393 Reading symbols from /home/philippe/valgrind/trunk_untouched/gdbserver_tests/sleepers...done. Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. [New LWP 27396] [New LWP 27395] [New LWP 27394] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. 0x00843416 in __kernel_vsyscall () (gdb) detach Detaching from program: /home/philippe/valgrind/trunk_untouched/gdbserver_tests/sleepers, process 27393 (gdb) atta 27434 Attaching to program: /home/philippe/valgrind/trunk_untouched/gdbserver_tests/sleepers, process 27434 Load new symbol table from "/bin/sleep"? (y or n) //////////// here GDB does not respond anymore.