From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15194 invoked by alias); 22 Nov 2014 08:04: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 15184 invoked by uid 89); 22 Nov 2014 08:04:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout29.012.net.il Received: from mtaout29.012.net.il (HELO mtaout29.012.net.il) (80.179.55.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Nov 2014 08:04:51 +0000 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NFF00K00KTTQ400@mtaout29.012.net.il> for gdb-patches@sourceware.org; Sat, 22 Nov 2014 10:02:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFF00IWPL0TC520@mtaout29.012.net.il>; Sat, 22 Nov 2014 10:02:54 +0200 (IST) Date: Sat, 22 Nov 2014 08:04:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 2/4] python support for fetching separate debug files: have_debug_info In-reply-to: To: Doug Evans Cc: gdb-patches@sourceware.org, palves@redhat.com, sergiodj@redhat.com Reply-to: Eli Zaretskii Message-id: <83a93ju0d7.fsf@gnu.org> References: <837fyp57bu.fsf@gnu.org> <83d28gtjr5.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00537.txt.bz2 > Date: Fri, 21 Nov 2014 12:22:23 -0800 > From: Doug Evans > Cc: gdb-patches , Pedro Alves , > Sergio Durigan Junior > > >> The problem that needs to be solved is for Python code to be able to tell > >> whether to spend time fetching separate debug files, as the latter can take > >> a significant amount of time. Also, a program may use a large number of > >> shared libraries and the user may wish (or not wish) debug info to be > >> fetched for each one. So we want, IMO, a simple and cheap initial > >> test for whether we need to fetch debug files. > > > > Why not make that test part of the method that fetches the debug info? > > This is Python code. What did you mean by "method" ? The method, which we expose to Python programs, which fetches debug info. > >> For the use-case in question, another way to look at the attribute is > >> "Has debug info been stripped or not?". > > > > But there's no reliable way to determine that, either, is there? > > Beyond detecting the absence of the requisite debug sections (in > dwarf: .debug_info, et.al.) ? > Or were you thinking of something else? I still don't understand what good will it make to have this attribute. It seems you would like it to allow an optimization, whereby some clever Python extension to GDB might examine this attribute and decide not to try to fetch the debug info. But then why not do that automatically all the time? why burden the Python programmer with this?