From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27097 invoked by alias); 15 Mar 2014 10:49:40 -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 27085 invoked by uid 89); 15 Mar 2014 10:49:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.9 required=5.0 tests=AWL,BAYES_50,RCVD_IN_PSBL,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: moutng.kundenserver.de Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.17.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 15 Mar 2014 10:49:39 +0000 Received: from smtp.ascolab.com ([213.95.4.182]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0Lu4P8-1X6Oyn3Li2-011Rcv; Sat, 15 Mar 2014 11:49:35 +0100 Received: from localhost (localhost [127.0.0.1]) by smtp.ascolab.com (Postfix) with ESMTP id 1B4D9E0A58 for ; Sat, 15 Mar 2014 11:49:35 +0100 (CET) Received: from smtp.ascolab.com ([127.0.0.1]) by localhost (smtp.ascolab.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id xTQFQyYQvQwG for ; Sat, 15 Mar 2014 11:49:31 +0100 (CET) Received: from lt-gergap.localnet (p3E9C2BC1.dip0.t-ipconnect.de [62.156.43.193]) by smtp.ascolab.com (Postfix) with ESMTPSA id A23B9E09FF for ; Sat, 15 Mar 2014 11:49:31 +0100 (CET) From: Gerhard Gappmeier To: gdb-patches@sourceware.org Subject: New feature "source-id" Date: Sat, 15 Mar 2014 10:49:00 -0000 Message-ID: <7365721.BnaR1nHazz@lt-gergap> User-Agent: KMail/4.12 (Linux/3.12.6-gentoo; KDE/4.12.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2842185.JVEPjNShRU"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00340.txt.bz2 --nextPart2842185.JVEPjNShRU Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Content-length: 3118 Hi all, I've implemented a new feature that I call "source-id" analogous to the=20 existing "build-id" functionality. Unlike fetching debug symbols automatica= lly=20 using build-ids this feature can fetch the correct source code from a versi= on=20 control system when debugging. The idea is that when you need to debug an executable or opening a coredump= of=20 an executable that was built with "source-id" and "build-id" enabled it jus= t=20 works. You don't need to care about how and where to get debug symbols and = the=20 correct sources. How does this works? The technical details are explained in the README.md=20 hosted in my test repository: https://github.com/gergap/source-id (The content of README.md is shown on this site nicely formatted) This repository contains an example that I used to test the new feature. It also contains example "source-fetch-scripts" that are used by GDB to fet= ch=20 the source code. This should probably be bundled with GDB itself. Just give= me=20 a hint where the best location would be to add these files in the GDB repo. The GDB patches you find here: https://github.com/gergap/binutils-gdb on the branch gergap/source-id-feature What has been changed in GDB: * add support for a new .note section ".note.gnu.source-id" to be able to=20 store and retrieve the VCS data from an ELF file. * add new gdb commands: "set source-lookup