From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108365 invoked by alias); 7 Oct 2019 16:00:59 -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 108356 invoked by uid 89); 7 Oct 2019 16:00:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: userp2130.oracle.com Received: from userp2130.oracle.com (HELO userp2130.oracle.com) (156.151.31.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Oct 2019 16:00:57 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x97Fx2HH002122; Mon, 7 Oct 2019 16:00:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=trWgj/OBIpyDXY+PUg+1WIaCQokEdoeLPMI89GQ/ARs=; b=SoZZriBmq3plPqs1sXLWX6aOtd2hT2OyA+aRE0rOjxOyobjeSYyDHrwpQDNFytwhClmi GH4QmIFXJ/ncOnNYv0+aPbCN097+4ZMtMq8CByYB4xuYfkYmbGDlloeuz63gUB4vGtlK igmJUL6ACDnLhh/IC1YBt64znhec0xcjefAO/ju7e9mq8lgFsxQ+5SxELKFbQJj9ZlXl TNHs8LZZV7EMecB/APyI0/eByDYHcS5dfLnsz3fx7q08zysq4bzPfCEsu+Iq1GUi1Tml GMbPdjOo5fGYXfNjUHxGvIDUPwZWpMiOe3igudvhYf9R/XfsTVxHckE6SOOxmsoHMUF0 jQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2vejku7sdr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2019 16:00:54 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x97FxDWL105039; Mon, 7 Oct 2019 16:00:53 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2vg1yu5ka2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2019 16:00:53 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x97G0qFl015246; Mon, 7 Oct 2019 16:00:52 GMT Received: from [172.27.35.125] (/108.88.88.153) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Oct 2019 09:00:52 -0700 Subject: Re: [PATCH v4 2/2] gdb: CTF support To: Simon Marchi , gdb-patches@sourceware.org References: <1570220592-5541-1-git-send-email-weimin.pan@oracle.com> <1570220592-5541-2-git-send-email-weimin.pan@oracle.com> From: Wei-min Pan Message-ID: <67a428ff-798d-3d32-db99-3a7e109c47f3@oracle.com> Date: Mon, 07 Oct 2019 16:00:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-10/txt/msg00190.txt.bz2 On 10/7/2019 7:40 AM, Simon Marchi wrote: > On 2019-10-04 4:23 p.m., Weimin Pan wrote: >> This patch adds the CTF (Compact Ansi-C Type Format) support in gdb. >> Two submissions on which this gdb work depends were posted earlier >> in May: >> >> * On the binutils mailing list - adding libctf which creates, updates, >> reads, and manipulates the CTF data. >> * On the gcc mailing list - expanding gcc to directly emit the CFT data >> with a new command line option -gt. >> >> CTF is a reduced form of debugging information whose main purpose is to >> describe the type of C entities such as structures, unions, typedefs and >> function arguments at the global scope only. It does not contain debug >> information about source lines, location expressions, or local variables. >> For more information on CTF, see the documentation in the libdtrace-ctf >> source tree, available here: >> >> . >> >> This patch expands struct elfinfo by adding the .ctf section, which >> contains CTF debugging info, and modifies elf_symfile_read() to read it. >> If both DWARF and CTF exist in a program, only DWARF will be read. CTF data >> will be read only when there is no DWARF. The two-stage symbolic reading >> and setting strategy, partial and full, was used. >> >> File ctfread.c contains functions to transform CTF data into gdb's internal >> symbol table structures by iterately reading entries from CTF sections >> of "data objects", "function info", "variable info", and "data types" >> when setting up either partial or full symbol table. If the ELF symbol table >> is available, e.g. not stripped, the CTF reader will associate the found >> type information with these symbol entries. Due to the proximity between DWARF >> and CTF (CTF being a much simplified subset of DWARF), some DWARF implementation >> was reused to support CTF. >> >> Test cases ctf-constvars.exp, ctf-cvexpr.exp, ctf-ptype.exp, and ctf-whatis.exp >> have been added to verify the correctness of this support. >> >> This patch has missing features and limitations which we will add and >> address in the future patches. > Hi Weimin, > > I got notified this morning that this patch series was pushed to master, although it > was not approved yet. I don't think I had any remaining comments and was probably going > to approve this version anyway, but I am wondering if you pushed this version to master > by mistake instead of your personal users/ branch, since I told you to do so. Hi Simon, I'm very sorry, should've pushed it to my private branch, my fault. Weimin > > Please just fix up the ChangeLog entry below: > >> diff --git a/gdb/ChangeLog b/gdb/ChangeLog >> index 3974823..03b9474 100644 >> --- a/gdb/ChangeLog >> +++ b/gdb/ChangeLog >> @@ -1,5 +1,20 @@ >> 2019-10-04 Weimin Pan >> >> + * ctfread.c: New file. >> + * ctfread.h: New file. >> + * elfread.c: Include ctfread.h. >> + (struct elfinfo text_p): New member ctfsect. >> + (elf_locate_sections): Mark CTF section. >> + (elf_symfile_read): Call elfctf_build_psymtabs. >> + * Makefile.in (LIBCTF): Add. >> + (CLIBS): Use it. >> + (CDEPS): Likewise. >> + (DIST): Add ctfread.c. >> + * ../Makefile.def (dependencies): Add all-libctf to all-gdb >> + * ../Makefile.in: Add "all-gdb: maybe-all-libctf" > As mentioned in the previous review, these last two lines must go in the top-level ChangeLog. > > Simon