Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Cc: Scott.Linder@amd.com, Simon Marchi <simon.marchi@efficios.com>,
	Zoran.Zaric@amd.com
Subject: Re: [PATCH v2 1/3] gdb: make frame_unwind_got_optimized return a not_lval value
Date: Thu, 27 Aug 2020 22:37:58 +0100	[thread overview]
Message-ID: <778c2923-ee09-a47e-74d6-3e01ed0e717a@palves.net> (raw)
In-Reply-To: <20200827205724.409603-2-simon.marchi@polymtl.ca>

On 8/27/20 9:57 PM, Simon Marchi via Gdb-patches wrote:

>  /* Return a value which indicates that FRAME copied REGNUM into
> diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
> index c80ddc84f291..25a601ccf4bb 100644
> --- a/gdb/frame-unwind.h
> +++ b/gdb/frame-unwind.h
> @@ -133,6 +133,9 @@ typedef void (frame_this_id_ftype) (struct frame_info *this_frame,
>     may be a lazy reference to memory, a lazy reference to the value of
>     a register in THIS frame, or a non-lvalue.
>  
> +   If the previous frame's register was not saved by THIS_FRAME and is
> +   therefore undefined, return a not_lval wholly optimized-out value.

Super nit:

"not_lval wholly optimized-out value" doesn't sound as natural
to me as "wholly optimized-out not_lval value" would.

It's just like "register optimized-out value" doesn't sound as
natural as "optimized-out register value" to me.

English adjective order is fun! 
https://www.theguardian.com/commentisfree/2016/sep/13/sentence-order-adjectives-rule-elements-of-eloquence-dictionary
https://www.grammar-monster.com/lessons/order_of_adjectives.htm

> +
>     THIS_PROLOGUE_CACHE can be used to share any prolog analysis data
>     with the other unwind methods.  Memory for that cache should be
>     allocated using FRAME_OBSTACK_ZALLOC().  */
> diff --git a/gdb/frame.c b/gdb/frame.c
> index 7ab3cdcdad41..ccaf97dc7e91 100644
> --- a/gdb/frame.c
> +++ b/gdb/frame.c
> @@ -1295,7 +1295,7 @@ frame_unwind_register_value (frame_info *next_frame, int regnum)
>        if (value_optimized_out (value))
>  	{
>  	  fprintf_unfiltered (gdb_stdlog, " ");
> -	  val_print_optimized_out (value, gdb_stdlog);
> +	  val_print_not_saved (gdb_stdlog);
>  	}
>        else
>  	{
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
> index a3e6f28c54f0..4ab7e2dbfc44 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
> @@ -74,3 +74,15 @@ for {set f 0} {$f < 3} {incr f} {
>  		    "r9\\s+${pattern_r8_r9_info}\\s*"] \
>  	"Check values of rax, rbx, rcx, r8, r9 in frame ${f}"
>  }
> +
> +# Test that the debug log statement in frame_unwind_register_value produces
> +# "not saved" and not# "optimized out".

Spurious # after "not".


  reply	other threads:[~2020-08-27 21:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 20:57 [PATCH v2 0/3] Support frames inlined in outer frames Simon Marchi
2020-08-27 20:57 ` [PATCH v2 1/3] gdb: make frame_unwind_got_optimized return a not_lval value Simon Marchi
2020-08-27 21:37   ` Pedro Alves [this message]
2020-08-27 20:57 ` [PATCH v2 2/3] gdb: introduce explicit outer frame id kind Simon Marchi
2020-08-27 21:38   ` Pedro Alves
2020-08-27 20:57 ` [PATCH v2 3/3] gdb: support frames inlined into the outer frame Simon Marchi
2020-09-08  9:55   ` [committed][gdb/testsuite] Fix gdb.dwarf2/frame-inlined-in-outer-frame.exp Tom de Vries
2020-08-27 21:44 ` [PATCH v2 0/3] Support frames inlined in outer frames Pedro Alves
2020-08-28  8:50 ` Andrew Burgess
2020-08-31 17:32   ` Simon Marchi

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=778c2923-ee09-a47e-74d6-3e01ed0e717a@palves.net \
    --to=pedro@palves.net \
    --cc=Scott.Linder@amd.com \
    --cc=Zoran.Zaric@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=simon.marchi@polymtl.ca \
    /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