From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10827 invoked by alias); 6 Oct 2011 19:41:29 -0000 Received: (qmail 10727 invoked by uid 22791); 6 Oct 2011 19:41:28 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_BJ X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 19:41:14 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RBtof-0004OV-IG from pedro_alves@mentor.com ; Thu, 06 Oct 2011 12:41:13 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 6 Oct 2011 20:41:11 +0100 From: Pedro Alves To: Tom Tromey Subject: Re: program spaces vs exec Date: Thu, 06 Oct 2011 19:41:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: Doug Evans , gdb@sourceware.org References: <20111005181526.B6CCA2461D1@ruffy.mtv.corp.google.com> <201110061942.49805.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201110062041.09462.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00037.txt.bz2 On Thursday 06 October 2011 20:34:48, Tom Tromey wrote: > Forgot to reply to part... > > Pedro> How do pretty-printers from a shared library that unloads go > Pedro> away? > > Tom> Generally they are attached to the objfile. So, they disappear > Tom> automatically when the objfile is removed. > > Pedro> There must be something more to the issue then. Both "file foo" or > Pedro> an exec get rid of the previous executable's symfile_objfile and > Pedro> create a new one too, so the executable's printers must already be > Pedro> being removed. > > That would work if the printer was attached to the executable's objfile; > but you can also attach a printer to a program space, which is the > problem case. Then this isn't just about execs indeed, and I don't understand the usefulness of attaching a printer to the program space. The program space is the same even if you run -> kill -> run -> `attach to some other process running some other program' -> kill -> "target remote :9999" -> etc. -- Pedro Alves