From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28339 invoked by alias); 24 Nov 2014 21:06:50 -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 28324 invoked by uid 89); 24 Nov 2014 21:06:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-vc0-f175.google.com Received: from mail-vc0-f175.google.com (HELO mail-vc0-f175.google.com) (209.85.220.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 24 Nov 2014 21:06:48 +0000 Received: by mail-vc0-f175.google.com with SMTP id hy10so4512346vcb.20 for ; Mon, 24 Nov 2014 13:06:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0Fs4KSjByFpGPWZY1xYt9dQFqlzYybct7584+QKgvZw=; b=EMx1MGkqM/KfzXcsVfKtdAAhX4NuEspty6HYXSzmn9g3mSd8J/J2QpZMIU4kA2qgkz EPZJ0jkN4RWKg8Zj3XHrB5VmMR998I8i08yNACj51tSg0useKu7p1j1LPKNxJ2WilHrW TsMlNBeff2jVjxSklMbU+bj65nFAQw8wriNQfvjKtUsd9Sz71SvPkCsNpTDs6nWKnwfF mgSynAMNgwLPoIE/Nh62ENKO2hRrz52ogHtsYPbfY3RBixJEhFh2oK2O9TpAo1JE3PCH nKZFPUvRY13q8UsarQSFAac3pZLO32ZvyOzNjgZ2FGnVADRoX46TUF6uCaC0xkXGLlwr oknQ== X-Gm-Message-State: ALoCoQkZMQHo6yXW4ghfkXydwfyBMqB8zPd/SBulfRikONmuFoRQaijCZpgyRwScTJZpAokwzeJq MIME-Version: 1.0 X-Received: by 10.220.124.4 with SMTP id s4mr13208462vcr.38.1416863206184; Mon, 24 Nov 2014 13:06:46 -0800 (PST) Received: by 10.52.114.101 with HTTP; Mon, 24 Nov 2014 13:06:46 -0800 (PST) In-Reply-To: References: <837fyp57bu.fsf@gnu.org> <83d28gtjr5.fsf@gnu.org> Date: Mon, 24 Nov 2014 21:06:00 -0000 Message-ID: Subject: Re: [PATCH 2/4] python support for fetching separate debug files: have_debug_info From: Doug Evans To: Eli Zaretskii Cc: gdb-patches , Pedro Alves , Sergio Durigan Junior Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00614.txt.bz2 On Fri, Nov 21, 2014 at 12:22 PM, Doug Evans wrote: > Another way we *could* go, which I kinda like, is to provide a general > purpose ELF API to Python, or try to do the bfd kind of thing and > abstract away ELF vs COFF, etc, and export that through gdb. Then one > could determine if debug info is present that way. If I were to do the > former (the ELF API) I'd like to make it separate from gdb: why write > something only some users can use. The latter (abstract away the file > format) has its own problems of course, but one might simplify it to > something along the lines of what libiberty/simple-object* provides. > Either of these solutions allows one to watch for a special section > pointing at separate debug info (e.g., .gnu_debuglink). > > [Down the road exporting a DWARF reader to Python would be useful too, > but that's later. If it involved providing our own libelf/libdwarf so > much the better.] Filing for reference sake. Another way to go, which I partially implemented, was to export bfd's iovec to Python. In the end it was more complex than I needed.