public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Lancelot SIX <lsix@lancelotsix.com>
To: Wei-min Pan <weimin.pan@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH V5] CTF: multi-CU and archive support
Date: Sat, 12 Jun 2021 00:07:21 +0100	[thread overview]
Message-ID: <20210611230721.vzlpo5u4umczi57g@Plymouth> (raw)
In-Reply-To: <a883558b-60f3-70fd-d50a-c1b3a90a2f9d@oracle.com>

> Hi,
> 
> You can find the latest gcc patch series for CTF support, which is currently
> under review, here:
> 
> http://gcc.1065356.n8.nabble.com/PATCH-V9-0-7-Support-for-the-CTF-and-BTF-debug-formats-td1897109.html
> 
> Also please make sure to use a binutils version with CTF support.
> 

Hi,

Thanks for the pointer.

Now that I have a ctf-aware gcc, I can give a first try to the patch.

It looks like the flag to enable CTF generation (at least in this
version of the GCC patch set) is '-gctf', not '-gt'.

The '-gt' flag is currently used in the tests to detect if the
compiler supports CTF (in gdb/testsuite/lib/gdb.exp).  In the current
situation, tests are skipped with GCC master + CTF.  We might want to
wait for GCC to settle on the flag, and update tests codebase as well as
this patch.

> 
> I believe  the psymtab_discarder's dtor should take care of discarding all
> built partial
> symbol tables. So I'm not sure if this is a CTF specific issue.
> 

It is taken care of by psymtab_storage::~psymtab_storage which is
eventually triggered by the dtor of objfile.  I did not dig enough
before sending the email.  Sorry for that.

> One way to avoid dealing with either the storage or dtor issue is to
> declare:
> 
>         struct ctf_context context;
> 
> in struct ctf_psymtab.

Yes, this would work.  However, considering what I missed with the
memory management of the psymtab and given that ctf_context is a POD
type, everything should properly come down with the dtor of objfile.  So
after reconsidering I believe your proposition should works.

Lancelot.

  reply	other threads:[~2021-06-11 23:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  0:20 Weimin Pan
2021-05-25  0:52 ` [PING][PATCH " Wei-min Pan
2021-06-02  0:05   ` [PING 2][PATCH " Wei-min Pan
2021-06-09  0:37     ` [PING 3][PATCH " Wei-min Pan
2021-06-10  0:40 ` [PATCH " Lancelot SIX
2021-06-10 21:15   ` Wei-min Pan
2021-06-11 23:07     ` Lancelot SIX [this message]
2021-06-11 18:19   ` Tom Tromey
2021-06-11 23:14     ` Lancelot SIX
2021-06-11 18:17 ` Tom Tromey
2021-06-11 20:26   ` Wei-min Pan

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=20210611230721.vzlpo5u4umczi57g@Plymouth \
    --to=lsix@lancelotsix.com \
    --cc=gdb-patches@sourceware.org \
    --cc=weimin.pan@oracle.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).