public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Wei-min Pan <weimin.pan@oracle.com>
To: Tom Tromey <tom@tromey.com>,
	Weimin Pan via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH,V4 1/2] CTF: fix incorrect function return type
Date: Sun, 9 May 2021 19:40:57 -0700	[thread overview]
Message-ID: <986a540b-1ccb-4dc2-ab50-541dba8b218b@oracle.com> (raw)
In-Reply-To: <875yzunw8a.fsf@tromey.com>


On 5/7/2021 1:07 PM, Tom Tromey wrote:
>>>>>> ">" == Weimin Pan via Gdb-patches <gdb-patches@sourceware.org> writes:
>>> The problems can be illustrated, with any program, below:
>>> (gdb) print main
>>> $1 = {main} 0x0
> Hi.  Sorry about the delay in my re-review.
> It's fine (and expected) to send patch pings to the list.
> It helps keep us honest I guess.
Sorry about that. Shall follow the protocol by pinging the patch going 
forward.

>
>>> -      sym->compute_and_set_names (name.get (), true, objfile->per_bfd);
>>> +      sym->compute_and_set_names (name, true, objfile->per_bfd);
> If the lifetime of 'name' is ok, then you don't need to copy it here --
> so you can pass 'false' as the second parameter.  See the comment in
> symtab.c just before general_symbol_info::compute_and_set_names.

Thanks - passing 'false' as the second parameter to compute_and_set_names is
the right thing to do. All CTF tests are still passing with the change.

>>> +  name = ctf_type_name_raw (fp, tid);
>>> +  if (name == nullptr || strlen (name) == 0)
>>> +  {
> The braces (and the code they surround) look under-indented to me.

Corrected.

>>> -  ccp->pst->add_psymbol (name.get (), true,
>>> +  ccp->pst->add_psymbol (name, true,
> Same here.

Sorry, the only place I can find is here and it looks indented correctly?

-  if (name == nullptr || strlen (name.get ()) == 0)
+  const char *name = ctf_type_name_raw (ccp->fp, tid);
+  if (name == nullptr || strlen (name) == 0)
      return 0;

-  ccp->pst->add_psymbol (name.get (), true,
+  ccp->pst->add_psymbol (name, true,

>
>>> -      pst->add_psymbol (tname.get (), true,
>>> +      pst->add_psymbol (tname, true,
> And here.

Also the indentation looks correct?

        else
         aclass = LOC_TYPEDEF;

-      pst->add_psymbol (tname.get (), true,
+      pst->add_psymbol (tname, true,

>
> If you fix these up, and it still works, it is fine to push.
> If it doesn't work then that would tend to put some doubt on the other
> parts of the patch that don't copy names.

OK, thank you.

>
> thanks,
> Tom

  reply	other threads:[~2021-05-10  2:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  1:00 [PATCH,V4 0/2] CTF: bug fixes and new features Weimin Pan
2021-04-27  1:00 ` [PATCH,V4 1/2] CTF: fix incorrect function return type Weimin Pan
2021-04-27  1:00   ` [PATCH,V4 2/2] CTF: multi-CU and archive support Weimin Pan
2021-05-07 20:29     ` Tom Tromey
2021-05-10  3:11       ` Wei-min Pan
2021-05-10 21:27         ` Tom Tromey
2021-05-11  0:33           ` Weimin Pan
2021-05-11 18:58           ` Weimin Pan
2021-05-13 17:21             ` Tom Tromey
2021-05-13 21:40               ` Wei-min Pan
2021-05-08 20:13     ` Tom Tromey
2021-05-10  3:12       ` Wei-min Pan
2021-05-07 20:07   ` [PATCH,V4 1/2] CTF: fix incorrect function return type Tom Tromey
2021-05-10  2:40     ` Wei-min Pan [this message]
2021-05-10 14:00       ` Tom Tromey
2021-05-16 22:31     ` 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=986a540b-1ccb-4dc2-ab50-541dba8b218b@oracle.com \
    --to=weimin.pan@oracle.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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).