This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Check for line notes on GCC as well as Clang
- From: Simon Marchi <simark at simark dot ca>
- To: Alan Hayward <Alan dot Hayward at arm dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Sun, 4 Nov 2018 23:16:21 -0500
- Subject: Re: [PATCH 2/2] Check for line notes on GCC as well as Clang
- References: <20181024090427.22721-1-alan.hayward@arm.com> <20181024090427.22721-2-alan.hayward@arm.com>
Hi Alan,
Is a "line note" a concept I am not familiar with, or is it just an entry in the
DWARF line number program?
On 2018-10-24 5:04 a.m., Alan Hayward wrote:
> i386 and amd64 only skip the prologue using line notes if the compiler is
> Clang. Also allow this for GCC.
Without understanding the problem at hand: since we were only using this info
with clang, I assume that there was a point where it wasn't trustworthy with gcc?
If so, since when is it trustworthy with gcc, long enough?
> With this change we can revert ovldbreak.exp back to only allowing line 49
> as the breakpoint for main.
>
> Fixes over 50 tests on Ubuntu x86_64.
>
> Note: Many other targets do NOT have any Clang/GNU check - they allow any
> valid result from skip_prologue_using_sal. Maybe that is the better fix
> here. However, I was erring on the side of caution.
When running the test locally before this series, everything passes. With this
series applied, I get:
$ make check TESTS="gdb.cp/ovldbreak.exp"
...
Running /home/simark/src/binutils-gdb/gdb/testsuite/gdb.cp/ovldbreak.exp ...
ERROR: can't read "might_kfail": no such variable
...
I assume that this particular error is due to a typo, so let's say I fix the
faulty line (s/might_kfail/might_fail/), then I get:
FAIL: gdb.cp/ovldbreak.exp: continue to bp overloaded : int
FAIL: gdb.cp/ovldbreak.exp: continue to bp overloaded : unsigned_int
FAIL: gdb.cp/ovldbreak.exp: continue to bp overloaded : long_int
FAIL: gdb.cp/ovldbreak.exp: continue to bp overloaded : unsigned_long_int
FAIL: gdb.cp/ovldbreak.exp: continue to bp overloaded : float
This is with the current gcc on Arch Linux:
gcc (GCC) 8.2.1 20180831
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Again, I don't really have time to dig into it.
Simon