Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] eval.c:evaluate_subexp_standard: Factor out function call handling
Date: Tue, 05 Sep 2017 10:19:00 -0000	[thread overview]
Message-ID: <a2e400b1-5145-e89f-e63a-ff73e744a35f@redhat.com> (raw)
In-Reply-To: <20170905094312.GC8425@1170ee0b50d5>


On 09/05/2017 10:43 AM, Yao Qi wrote:
> On 17-09-04 23:13:30, Pedro Alves wrote:
>> While working on the no-debug-info debugging improvements, I found
>> evaluate_subexp_standard's function call code unnecessarily long and
>> hard to navigate and debug.  The use of goto doesn't help either.
> 
> It is good to shorten the long function.  Patch looks good to me.
> 
>> +/* Evaluate a function call.  The function to be called is in
>> +   argvec[0].  FUNCTION_NAME is the name of the function, if known.
> 
> s/argvec/ARGVEC/ ?
> and better to document that argvec[1] - argvec[nargs] are arguments
> passed to the function.
> 

Indeed.  I'll push it in with this comment:

/* Evaluate a function call.  The function to be called is in
   ARGVEC[0] and the arguments passed to the function are in
   ARGVEC[1..NARGS].  FUNCTION_NAME is the name of the function, if
   known.  DEFAULT_RETURN_TYPE is used as the function's return type
   if the return type is unknown.  */

Thanks,
Pedro Alves


      reply	other threads:[~2017-09-05 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 22:13 Pedro Alves
2017-09-05  9:43 ` Yao Qi
2017-09-05 10:19   ` Pedro Alves [this message]

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=a2e400b1-5145-e89f-e63a-ff73e744a35f@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.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