Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	"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 12:17:34 -0500	[thread overview]
Message-ID: <a136e134-bda1-b442-9abb-1b8e20bdf665@polymtl.ca> (raw)
In-Reply-To: <AM0PR0602MB341029C1241395C969437ED3E4D80@AM0PR0602MB3410.eurprd06.prod.outlook.com>



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.

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

Simon

  reply	other threads:[~2020-12-30 17:18 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 [this message]
2020-12-30 19:54   ` Bernd Edlinger
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=a136e134-bda1-b442-9abb-1b8e20bdf665@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=bernd.edlinger@hotmail.de \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.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