diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f6b0c01..4f84b40 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17665,7 +17665,8 @@ dwarf_decode_lines_1 (struct line_header *lh, struct dwarf2_cu *cu, 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. */ - if (address == 0 && address < lowpc) + if (address == 0 && address < lowpc + && (objfile->flags & OBJF_MAINLINE)) { /* This line table is for a function which has been GCd by the linker. Ignore it. PR gdb/12528 */