Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFA] MIPS16 FP manual call/return fixes
Date: Thu, 26 Apr 2012 19:33:00 -0000	[thread overview]
Message-ID: <87mx5y70mv.fsf@fleche.redhat.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1204231321310.19835@tp.orcam.me.uk> (Maciej	W. Rozycki's message of "Mon, 23 Apr 2012 14:20:21 +0100")

>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej>  Therefore I had to change the return handlers' internal API to
Maciej> take the value of the function being handled rather than its
Maciej> lone type, if available.  This has led to adjusting the whole
Maciej> infrastructure.

It seems reasonable to me.

I didn't try to read the MIPS part of the patch.

Maybe Jan could read the ifunc change in elfread.c.

Maciej>  # stored into the appropriate register.  This can be used when we want
Maciej>  # to force the value returned by a function (see the "return" command
Maciej>  # for instance).
Maciej> -M:enum return_value_convention:return_value:struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf
Maciej> +M:enum return_value_convention:return_value:struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf

A couple of nits here:

Update the introductory comment to refer to FUNCTION, not FUNCTYPE.

Also, please s/functype/function/ in the list of argument names (at the
end of the line).

Maciej> +	      CORE_ADDR faddr = BLOCK_START (SYMBOL_BLOCK_VALUE (a->function));
Maciej> +	      struct value *func = allocate_value (SYMBOL_TYPE (a->function));

I think read_var_value would be better here.

Maciej> +      if (thisfun != NULL)
Maciej> +	{
Maciej> +	  function = allocate_value (SYMBOL_TYPE (thisfun));
Maciej> +	  set_value_address (function,
Maciej> +			     BLOCK_START (SYMBOL_BLOCK_VALUE (thisfun)));

Here too.

Maciej> +                  func_value = allocate_value (SYMBOL_TYPE (function));
Maciej> +                  func_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
Maciej> +                  set_value_address (func_value, func_addr);
Maciej> +                  self_bpfinish->function_value =
Maciej> +                      value_to_value_object (func_value);

Here too.

The rest looked good to me.

Tom


  parent reply	other threads:[~2012-04-26 19:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 13:30 Maciej W. Rozycki
2012-04-26 19:20 ` Tom Tromey
2012-04-26 22:23   ` Maciej W. Rozycki
2012-04-27 15:16     ` Maciej W. Rozycki
2012-04-27 15:28       ` Tom Tromey
2012-04-26 19:33 ` Tom Tromey [this message]
2012-04-30 23:45   ` Maciej W. Rozycki
2012-05-01 14:05     ` Jan Kratochvil
2012-05-01 17:22       ` Maciej W. Rozycki
2012-05-02 21:28         ` Jan Kratochvil
2012-05-08 14:30           ` Maciej W. Rozycki
2012-05-12 19:38             ` Jan Kratochvil
2012-05-14  9:12               ` Maciej W. Rozycki
2012-05-14 11:54                 ` Jan Kratochvil
2012-05-16 14:45                   ` Maciej W. Rozycki

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=87mx5y70mv.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@codesourcery.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