aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/missing-line-table.c
AgeCommit message (Collapse)AuthorFilesLines
2025-04-08Update copyright dates to include 2025Tom Tromey1-1/+1
This updates the copyright headers to include 2025. I did this by running gdb/copyright.py and then manually modifying a few files as noted by the script. Approved-By: Eli Zaretskii <eliz@gnu.org>
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-05-19gdb/testsuite: test for a function with no line tableAndrew Burgess1-0/+32
This commit adds a test for the following commit: commit e86e87f77fd5d8afb3e714f1d9e09e0ff5b4e6ff Date: Tue Nov 28 16:23:32 2006 +0000 * symtab.c (find_pc_sect_line): Do not return a line before the start of a symtab. We have been carrying a test for that commit in the Fedora GDB tree since that commit was added to GDB. I don't know why the test wasn't added along with the original commit, but as was written, the test is pretty gross, it uses objcopy to pull the .text section from an object file, which was then injected into another source file within a .asm statement... ... these days we can just make use of the DWARF assembler to achieve the same results, so I've rewritten the test and think it is worth adding this to upstream GDB. The original patch was about about how we find the best symtab and line table entry, and what to do when GDB can't find a good match. The new test creates a CU with two functions, only one of which is covered by the line table. With the above patch reverted GDB returns an invalid address. With the above patch reverted I did run the testsuite to see what other tests might already be exercising this functionality, and I found two tests: gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp gdb.dwarf2/dw2-vendor-extended-opcode.exp These are pretty similar, they either create minimal, or no line table for one of the functions in the source file, and as a consequence GDB returns an unexpected address at some point during the test. However, both of those tests are really focused on other issues, so I think this new test does add some value. Plus the new test is not large, so it's not a huge cost to also run this new test. Reviewed-By: Tom Tromey <tom@tromey.com>