aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/inline-section-gc
AgeCommit message (Collapse)AuthorFilesLines
2022-01-20Avoid bad breakpoints with --gc-sectionsTom Tromey3-0/+61
We found a case where --gc-sections can cause gdb to set an invalid breakpoint. In the included test case, gdb will set a breakpoint with two locations, one of which is 0x0. The code in lnp_state_machine::check_line_address is intended to filter out this sort of problem, but in this case, the entire CU is empty, causing unrelocated_lowpc==0x0 -- which circumvents the check. It seems to me that if a CU is empty like this, then it is ok to simply ignore the line table, as there won't be any locations anyway.