Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wei-min Pan <weimin.pan@oracle.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH v4 2/2] gdb: CTF support
Date: Mon, 07 Oct 2019 16:00:00 -0000	[thread overview]
Message-ID: <67a428ff-798d-3d32-db99-3a7e109c47f3@oracle.com> (raw)
In-Reply-To: <b8323ef7-09b4-79df-bc39-580c0f707ef3@simark.ca>


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:
>>
>> <https://raw.githubusercontent.com/oracle/libdtrace-ctf/master/doc/ctf-format>.
>>
>> 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  <weimin.pan@oracle.com>
>>   
>> +	* 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


  reply	other threads:[~2019-10-07 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 20:25 [PATCH v4 1/2] Renaming of ctf (the trace format) files Weimin Pan
2019-10-04 20:24 ` [PATCH v4 2/2] gdb: CTF support Weimin Pan
2019-10-07 14:40   ` Simon Marchi
2019-10-07 16:00     ` Wei-min Pan [this message]
     [not found]   ` <87ftk1erzn.fsf@tromey.com>
2019-10-10 19:05     ` Wei-min Pan
2019-10-15 20:19       ` Tom Tromey
2019-10-17 21:18         ` Wei-min Pan
2019-10-18 20:36           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67a428ff-798d-3d32-db99-3a7e109c47f3@oracle.com \
    --to=weimin.pan@oracle.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox