From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 12FC038618A5 for ; Mon, 31 Aug 2020 17:32:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 12FC038618A5 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 07VHWmjV001727 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 13:32:53 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 07VHWmjV001727 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C57371E599; Mon, 31 Aug 2020 13:32:47 -0400 (EDT) Subject: Re: [PATCH v2 0/3] Support frames inlined in outer frames To: Andrew Burgess Cc: gdb-patches@sourceware.org, Scott.Linder@amd.com, Zoran.Zaric@amd.com References: <20200827205724.409603-1-simon.marchi@polymtl.ca> <20200828085056.GZ853475@embecosm.com> From: Simon Marchi Message-ID: <122353cf-015e-6024-6020-0f0519ae1255@polymtl.ca> Date: Mon, 31 Aug 2020 13:32:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200828085056.GZ853475@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 31 Aug 2020 17:32:48 +0000 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-DCC: sonic: antispam2020.polymtl.ca 1254; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2020 17:33:01 -0000 On 2020-08-28 4:50 a.m., Andrew Burgess wrote: > * Simon Marchi via Gdb-patches [2020-08-27 16:57:21 -0400]: > >> This is essentially a v2 of this thread here: >> >> https://sourceware.org/pipermail/gdb-patches/2020-March/166786.html >> >> In summary, this is what the patches do: >> >> 1. fixes a latent bug that triggered when trying to unwind a frame >> inlined in the outer frame >> 2. changes how outer frames are represented >> 3. allows frames inlined in outer frames, adds a test that runs on >> regular hardware >> >> I don't see any regression on x86-64. I tested previous iterations of >> the series (with similar code) on aarch64 too and didn't see any >> regression. > > I took a look through all these patches, and they all look good to me. > > Thanks, > Andrew Thanks, I merged them. I forgot to fix the nits pointed out by Pedro before merging, so I pushed another patch on top to do so: >From f3bd50f1984e83e6abf5e971c56ce8fac3e936db Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 31 Aug 2020 13:31:01 -0400 Subject: [PATCH] gdb: fix nits in previous patches I forgot to fix some nits pointed out in review before merging the "frame inlined in outer frame series", this patch fixes them. gdb/ChangeLog: * frame-unwind.h (frame_prev_register_ftype): Fix adjective ordering in comment. * frame.c (frame_id_eq): Fix indentation. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-reg-undefined.exp: Remove spurious #. Change-Id: Iaddde9677fc3f68382558d1a16f5a0b4beb78bac --- gdb/ChangeLog | 6 ++++++ gdb/frame-unwind.h | 2 +- gdb/frame.c | 2 +- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9637e4a7b12d..cc998d5ee585 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-08-31 Simon Marchi + + * frame-unwind.h (frame_prev_register_ftype): Fix adjective + ordering in comment. + * frame.c (frame_id_eq): Fix indentation. + 2020-08-31 Scott Linder Simon Marchi diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index 25a601ccf4bb..6cc1a888861e 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -134,7 +134,7 @@ typedef void (frame_this_id_ftype) (struct frame_info *this_frame, 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. + therefore undefined, return a wholly optimized-out not_lval value. THIS_PROLOGUE_CACHE can be used to share any prolog analysis data with the other unwind methods. Memory for that cache should be diff --git a/gdb/frame.c b/gdb/frame.c index 54f4c613c9e8..0b708e668272 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -774,7 +774,7 @@ frame_id_eq (frame_id l, frame_id r) bool eq; if (l.stack_status == FID_STACK_INVALID - || r.stack_status == FID_STACK_INVALID) + || r.stack_status == FID_STACK_INVALID) /* Like a NaN, if either ID is invalid, the result is false. Note that a frame ID is invalid iff it is the null frame ID. */ eq = false; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 66f1fe8533f2..148f31d26dd6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-08-31 Simon Marchi + + * gdb.dwarf2/dw2-reg-undefined.exp: Remove spurious #. + 2020-08-31 Simon Marchi * gdb.dwarf2/frame-inlined-in-outer-frame.exp: New file. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp index 4ab7e2dbfc44..75ea1f7b88ac 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp @@ -76,7 +76,7 @@ for {set f 0} {$f < 3} {incr f} { } # Test that the debug log statement in frame_unwind_register_value produces -# "not saved" and not# "optimized out". +# "not saved" and not "optimized out". gdb_test "set debug frame 1" gdb_test {print $rax} {frame_unwind_register_value[^\r\n]+rax[^\r\n]+not saved.*} gdb_test "set debug frame 0" -- 2.26.2