public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Weimin Pan via Gdb-patches <gdb-patches@sourceware.org>
Cc: Weimin Pan <weimin.pan@oracle.com>
Subject: Re: [PATCH 2/5] CTF: set up debug info for function arguments
Date: Fri, 05 Feb 2021 08:40:19 -0700	[thread overview]
Message-ID: <878s825xr0.fsf@tromey.com> (raw)
In-Reply-To: <1612230528-25905-3-git-send-email-weimin.pan@oracle.com> (Weimin Pan via Gdb-patches's message of "Mon, 1 Feb 2021 20:48:45 -0500")

>>>>> ">" == Weimin Pan via Gdb-patches <gdb-patches@sourceware.org> writes:

>> Added this support in read_func_kind_type after gcc started generating
>> CTF for function arguments.

>> Expanded gdb.base/ctf-ptype.exp to test function arguments. Also fixed
>> some typos.

Thank you.

This needs ChangeLog entries.

>> ---
>>  gdb/ctfread.c                        | 34 +++++++++++++++++++++++++++++++++-
>>  gdb/testsuite/gdb.base/ctf-ptype.exp | 19 ++++++++++++++++---

I guess the two existing ctf tests could also be moved to the proposed
gdb.ctf.  What do you think?  If you agree, this would make sense to do
as a separate "FYI" patch.

>> +  /* Set up function's arguments.  */
>> +  argc = cfi.ctc_argc;
>> +  type->set_num_fields (argc);
>> +  if (cfi.ctc_flags & CTF_FUNC_VARARG)
>> +    type->set_has_varargs (1);

Should be 'true' instead of '1'.

>> +      argv = XNEWVEC (ctf_id_t, argc);

gdb style is to use a std::vector for this kind of thing now.
That way you can remove the explicit memory management.

Tom

  parent reply	other threads:[~2021-02-05 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  1:48 [PATCH 0/5] CTF: bug fixes and new features Weimin Pan
2021-02-02  1:48 ` [PATCH 1/5] CTF: fix incorrect function return type Weimin Pan
2021-02-02  1:48   ` [PATCH 2/5] CTF: set up debug info for function arguments Weimin Pan
2021-02-02  1:48     ` [PATCH 3/5] CTF: handle forward reference type Weimin Pan
2021-02-02  1:48       ` [PATCH 4/5] CTF: add all members of an enum type to psymtab Weimin Pan
2021-02-02  1:48         ` [PATCH 5/5] CTF: multi-CU and archive support Weimin Pan
2021-02-05 15:42       ` [PATCH 3/5] CTF: handle forward reference type Tom Tromey
2021-02-05 19:33         ` Wei-min Pan
2021-02-05 15:40     ` Tom Tromey [this message]
2021-02-05 19:21       ` [PATCH 2/5] CTF: set up debug info for function arguments Wei-min Pan
2021-02-05 15:33   ` [PATCH 1/5] CTF: fix incorrect function return type Tom Tromey
2021-02-05 19:12     ` 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=878s825xr0.fsf@tromey.com \
    --to=tom@tromey.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).