Thanks for review. Attached PATCH v2 with comment adjustment. On 2020-07-01, Andrew Burgess wrote: >* Fangrui Song via Gdb-patches [2020-06-30 16:18:42 -0700]: > >> LLD from 11 onwards (https://reviews.llvm.org/D81784) uses -1 to >> represent a relocation in .debug_line referencing a discarded symbol. >> Recognize -1 to fix gdb.base/break-on-linker-gcd-function.exp when the >> linker is a newer LLD. >> >> gdb/ChangeLog: >> >> * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1. >> --- >> gdb/dwarf2/read.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c >> index b097f624b6..7cf2691ae9 100644 >> --- a/gdb/dwarf2/read.c >> +++ b/gdb/dwarf2/read.c >> @@ -20380,9 +20380,13 @@ lnp_state_machine::check_line_address (struct dwarf2_cu *cu, >> /* If ADDRESS < UNRELOCATED_LOWPC then it's not a usable value, it's outside >> the pc range of the CU. However, we restrict the test to only ADDRESS >> values of zero to preserve GDB's previous behaviour which is to handle >> - the specific case of a function being GC'd by the linker. */ >> + the specific case of a function being GC'd by the linker. >> >> - if (address == 0 && address < unrelocated_lowpc) >> + LLD from 11 onwards (https://reviews.llvm.org/D81784) uses -1 to represent >> + the tombstone value. >> + */ > >If I understand this correctly then "tombstone value" here is the same >as "a function being GC'd by the linker". If that's correct then >could you just use that phrase please as it is clearer, and matches >the terminology already used in the comment. Thanks. Reworded the comment added by c3b7b696c231416ac90fd9cb7d5ce735b3683356 a bit. >The trailing '*/' should be on the same line as the end of the >comment, with two whitespace before it, so '...value. */'. >> + >> + if ((address == 0 && address < unrelocated_lowpc) || address == (CORE_ADDR)-1) > >There should be a whitespace after the cast, so '(CORE_ADDR) -1'. > >Thanks, >Andrewx clang-format deletes space in `(CORE_ADDR) -1`. I think I need to adjust some options for my minimal .clang-format ... % cat .clang-format BasedOnStyle: GNU >> { >> /* This line table is for a function which has been >> GCd by the linker. Ignore it. PR gdb/12528 */ >> -- >> 2.27.0.212.ge8ba1cc988-goog >>