Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Andrew Burgess <andrew.burgess@embecosm.com>,
	Joel Brobecker <brobecker@adacore.com>,
	Tom Tromey <tom@tromey.com>, Pedro Alves <palves@redhat.com>,
	Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v5] Fix range end handling of inlined subroutines
Date: Wed, 30 Dec 2020 20:54:52 +0100	[thread overview]
Message-ID: <AM0PR0602MB341079D0BBC6E1AFF64C4EB2E4D70@AM0PR0602MB3410.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <a136e134-bda1-b442-9abb-1b8e20bdf665@polymtl.ca>

[-- Attachment #1: Type: text/plain, Size: 2280 bytes --]

On 12/30/20 6:17 PM, Simon Marchi wrote:
> 
> 
> On 2020-12-29 4:10 a.m., Bernd Edlinger wrote:
>> Hi,
>>
>>
>> this is a minor update to the previous version here:
>> https://sourceware.org/pipermail/gdb-patches/2020-November/173614.html
>>
>> The only real change is here:
>>
>> --- a/gdb/buildsym.c
>> +++ b/gdb/buildsym.c
>> @@ -429,7 +429,10 @@ struct block *
>>      {
>>        m_inline_end_vector.push_back (end_inclusive + 1);
>>        if (end_inclusive + 1 == start)
>> -       end_inclusive = start;
>> +       {
>> +         end_inclusive = start;
>> +         m_pending_addrmap_interesting = true;
>> +       }
>>      }
>>  
>>    if (m_pending_addrmap == nullptr)
>>
>>
>> The test case with an empty inline that triggered this
>> is from PR 25987.
>>
>> It is a real-world code that triggers both an empty inline
>> function and the wrong call-stack immediately after
>> the inline.  So I added this test case as well.
>>
>> So this fixes PR 25987 as well as a lot of issues with
>> debugging inlined functions in general.
>>
>>
>> Thanks
>> Bernd.
>>
> 
> I'll look at this patch to try to get the ball rolling, even though I do
> not feel qualified at all.
> 
> One quick thing, in this change here:
> 
> --- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp
> +++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
> @@ -29,16 +29,9 @@ if {[test_compiler_info gcc*] && ![supports_statement_frontiers] } {
>  proc do_test { use_header } {
>      global srcfile testfile
>  
> -    if { $use_header } {
> -       # This test will not pass due to poor debug information
> -       # generated by GCC (at least upto 10.x).  See
> -       # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94474
> -       return
> -    }
> -
>      set options {c++ debug nowarnings optimize=-O2}
>      if { [supports_statement_frontiers] } {
> -       lappend options -gstatement-frontiers
> +       lappend options additional_flags=-gstatement-frontiers
>      }
> 
> You appear to fix a bug in the test where we were missing "additional_flags=",
> causing -gstatement-frontiers not to be passed to the compiler.  I think that
> fix could be pushed separately immediately.
> 

Yes.  I can do that.

I quickly extracted that one line change as follows.

Is it ok to push?


Thanks
Bernd.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-passing-debug-options-for-gcc.patch --]
[-- Type: text/x-patch; name="0001-Fix-passing-debug-options-for-gcc.patch", Size: 1275 bytes --]

From 15ba1f805e60264a584b321a0eab56f3233e854b Mon Sep 17 00:00:00 2001
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Tue, 3 Nov 2020 18:41:43 +0100
Subject: [PATCH] Fix passing debug options for gcc

Fix a bug in the test where we were missing "additional_flags=",
causing -gstatement-frontiers not to be passed to the compiler.

The issue was introduced in
eb24648c453c28f2898fb599311ba004394a8b41 ("Fix gdb.cp/step-and-next-inline.exp with Clang").

gdb/testsuite:
2020-12-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* gdb.cp/step-and-next-inline.exp: Fix test case.
---
 gdb/testsuite/gdb.cp/step-and-next-inline.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.exp b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
index 43a7101..08a4b88 100644
--- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp
+++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
@@ -38,7 +38,7 @@ proc do_test { use_header } {
 
     set options {c++ debug nowarnings optimize=-O2}
     if { [supports_statement_frontiers] } {
-	lappend options -gstatement-frontiers
+	lappend options additional_flags=-gstatement-frontiers
     }
     if { $use_header } {
 	lappend options additional_flags=-DUSE_NEXT_INLINE_H
-- 
1.9.1


  reply	other threads:[~2020-12-30 19:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29  9:10 Bernd Edlinger
2020-12-30 17:17 ` Simon Marchi via Gdb-patches
2020-12-30 19:54   ` Bernd Edlinger [this message]
2020-12-30 22:56     ` Simon Marchi via Gdb-patches
2020-12-30 18:48 ` Simon Marchi via Gdb-patches
2020-12-30 20:49   ` Bernd Edlinger

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=AM0PR0602MB341079D0BBC6E1AFF64C4EB2E4D70@AM0PR0602MB3410.eurprd06.prod.outlook.com \
    --to=bernd.edlinger@hotmail.de \
    --cc=andrew.burgess@embecosm.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    --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