summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/SymbolFile/Breakpad
AgeCommit message (Collapse)Author
2025-07-30[lldb] Remove %T from lit tests (#151343)Aiden Grossman
%T has been deprecated for about seven years, mostly because it is not unique to each test which can lead to races. This patch updates the few remaining tests in lldb that use %T to not use it (either directly using files or creating their own temp dir). The eventual goal is to remove support for %T from llvm-lit given few tests use it and it still has racey behavior. This patch errors on the side of creating new temp dirs even when not strictly necessary to avoid needing to update filenames inside filecheck matchers.
2025-05-28[lldb] Make AddressRange dump easier on the eye (#141062)Pavel Labath
2025-05-23[lldb] Change synthetic symbol names to have file address (#138416)Ely Ronnen
* Changes the default synthetic symbol names to contain their file address This is a new PR after the first PR (#137512) was reverted because it didn't update the way unnamed symbols were searched in the symbol table, which relied on the index being in the name. This time also added extra test to make sure the symbol is found as expected
2025-05-01Revert "[lldb] Change synthetic symbol names to have file address (#137512)"Felipe de Azevedo Piovezan
This reverts commit b69957fa642635f769c3aa33a539f74497df0b4d.
2025-05-01[lldb] Change synthetic symbol names to have file address (#137512)Ely Ronnen
Changes the default synthetic symbol names to contain their file address
2024-05-30[lldb] Fix collisions between two breakpad testsPavel Labath
symtab-sorted-by-size.test was using the same output file name as symtab.test.
2024-03-04[lldb] Use sort-ordering for indexes when sorting by size (#83889)Jonas Devlieghere
Use sort-ordering for indexes when sorting by size. This addresses Jason's post commit review feedback.
2024-03-01[lldb] Add support for sorting by size to `target module dump symtab` (#83527)Jonas Devlieghere
This patch adds support to sort the symbol table by size. The command already supports sorting and it already reports sizes. Sorting by size helps diagnosing size issues. rdar://123788375
2022-11-22[LLDB][Minidump] Merge executable module's architecture into target's ↵Zequan Wu
architecture. This allows minidump process ABI to match the PE/COFF file ABI. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D137873
2022-06-29Fix inline-record.test for Arm/WindowsMuhammad Omair Javaid
This patch fixes inline-record.test to run on multiple platforms including Arm/Windows. Test is fixed to expect any value for id fields of functions and blocks returned by 'image lookup' command. This field can be any value as it is internally generated id.
2021-11-10[LLDB][Breakpad] Make lldb understand INLINE and INLINE_ORIGIN records in ↵Zequan Wu
breakpad. Teach LLDB to understand INLINE and INLINE_ORIGIN records in breakpad. They have the following formats: ``` INLINE inline_nest_level call_site_line call_site_file_num origin_num [address size]+ INLINE_ORIGIN origin_num name ``` `INLNIE_ORIGIN` is simply a string pool for INLINE so that we won't have duplicated names for inlined functions and can show up anywhere in the symbol file. `INLINE` follows immediately after `FUNC` represents the ranges of momery address that has functions inlined inside the function. Differential Revision: https://reviews.llvm.org/D113330
2021-11-10[LLDB][Breakpad] Create a function for each compilation unit.Zequan Wu
Since every FUNC record (in breakpad) is a compilation unit, creating the function for the CU allows `ResolveSymbolContext` to resolve `eSymbolContextFunction`. Differential Revision: https://reviews.llvm.org/D113163
2021-07-27Create synthetic symbol names on demand to improve memory consumption and ↵Greg Clayton
startup times. This is a resubmission of https://reviews.llvm.org/D105160 after fixing testing issues. This fix was created after profiling the target creation of a large C/C++/ObjC application that contained almost 4,000,000 redacted symbol names. The symbol table parsing code was creating names for each of these synthetic symbols and adding them to the name indexes. The code was also adding the object file basename to the end of the symbol name which doesn't allow symbols from different shared libraries to share the names in the constant string pool. Prior to this fix this was creating 180MB of "___lldb_unnamed_symbol" symbol names and was taking a long time to generate each name, add them to the string pool and then add each of these names to the name index. This patch fixes the issue by: not adding a name to synthetic symbols at creation time, and allows name to be dynamically generated when accessed doesn't add synthetic symbol names to the name indexes, but catches this special case as name lookup time. Users won't typically set breakpoints or lookup these synthetic names, but support was added to do the lookup in case it does happen removes the object file baseanme from the generated names to allow the names to be shared in the constant string pool Prior to this fix the startup times for a large application was: 12.5 seconds (cold file caches) 8.5 seconds (warm file caches) After this fix: 9.7 seconds (cold file caches) 5.7 seconds (warm file caches) The names of the symbols are auto generated by appending the symbol's UserID to the end of the "___lldb_unnamed_symbol" string and is only done when the name is requested from a synthetic symbol if it has no name. Differential Revision: https://reviews.llvm.org/D106837
2021-07-02Revert "Create synthetic symbol names on demand to improve memory ↵Jonas Devlieghere
consumption and startup times." This reverts commit c8164d0276b97679e80db01adc860271ab4a5d11 and 43f6dad2344247976d5777f56a1fc29e39c6c717 because it breaks TestDyldTrieSymbols.py on GreenDragon.
2021-06-29Create synthetic symbol names on demand to improve memory consumption and ↵Greg Clayton
startup times. This fix was created after profiling the target creation of a large C/C++/ObjC application that contained almost 4,000,000 redacted symbol names. The symbol table parsing code was creating names for each of these synthetic symbols and adding them to the name indexes. The code was also adding the object file basename to the end of the symbol name which doesn't allow symbols from different shared libraries to share the names in the constant string pool. Prior to this fix this was creating 180MB of "___lldb_unnamed_symbol" symbol names and was taking a long time to generate each name, add them to the string pool and then add each of these names to the name index. This patch fixes the issue by: - not adding a name to synthetic symbols at creation time, and allows name to be dynamically generated when accessed - doesn't add synthetic symbol names to the name indexes, but catches this special case as name lookup time. Users won't typically set breakpoints or lookup these synthetic names, but support was added to do the lookup in case it does happen - removes the object file baseanme from the generated names to allow the names to be shared in the constant string pool Prior to this fix the startup times for a large application was: 12.5 seconds (cold file caches) 8.5 seconds (warm file caches) After this fix: 9.7 seconds (cold file caches) 5.7 seconds (warm file caches) The names of the symbols are auto generated by appending the symbol's UserID to the end of the "___lldb_unnamed_symbol" string and is only done when the name is requested from a synthetic symbol if it has no name. Differential Revision: https://reviews.llvm.org/D105160
2021-06-29Revert D104488 and friends since it broke the windows botStella Stamenova
Reverts commits: "Fix failing tests after https://reviews.llvm.org/D104488." "Fix buildbot failure after https://reviews.llvm.org/D104488." "Create synthetic symbol names on demand to improve memory consumption and startup times." This series of commits broke the windows lldb bot and then failed to fix all of the failing tests.
2021-06-28Fix failing tests after https://reviews.llvm.org/D104488.Greg Clayton
Synthetic names no longer have the shared library name appended to the end.
2021-04-13[lldb] Require x86 for various NativePDB, Breakpad and Minidump testsDavid Spickett
These tests fail if you build without the x86 llvm backend. Either because they use an x86 triple or try to backtrace which requires some x86 knowledge to see all frames. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D100194
2020-11-09[lldb][test] - Update test cases after yaml2obj change.Georgii Rymar
The format of program header descriptions was changed by D90458.
2020-09-03[lldb] Make symbol list output from `image dump symtab` not depend on ↵Raphael Isemann
internal ordering of DenseMap `image dump symtab` seems to output the symbols in whatever order they appear in the DenseMap that is used to filter out symbols with non-unique addresses. As DenseMap is a hash map this order can change at any time so the output of this command is pretty unstable. This also causes the `Breakpad/symtab.test` to fail with enabled reverse iteration (which reverses the DenseMap order to find issues like this). This patch makes the DenseMap a std::vector and uses a separate DenseSet to do the address filtering. The output order is now dependent on the order in which the symbols are read (which should be deterministic). It might also avoid a bit of work as all the work for creating the Symbol constructor parameters is only done when we can actually emplace a new Symbol. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D87036
2020-08-25Update UnwindPlan dump to list if it is a trap handler func; also CommandJason Molenda
Update the "image show-unwind" command output to show if the function being shown is listed as a user-setting or platform trap handler. Update the individual UnwindPlan dumps to show whether the unwind plan is registered as a trap handler.
2020-08-20[test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded input ↵Fangrui Song
redirection
2020-05-25[lldb] Remove custom DWARF expression printing codePavel Labath
The llvm DWARFExpression dump is nearly identical, but better -- for example it does print a spurious space after zero-argument expressions. Some parts of our code (variable locations) have been already switched to llvm-based expression dumping. This switches the remainder: unwind plans and some unit tests.
2020-03-26[lldb/breakpad] Fix register resolution on armPavel Labath
In breakpad, only x86 (and mips) registers have a leading '$' in their names. Arm architectures use plain register names. Previously, lldb was assuming all registers have a '$'. Fix the code to match the (unfortunately, inconsistent) reality.
2020-03-25[lldb] add lit.local.cfg for breakpad testsPavel Labath
The reason is to add .yaml as a valid test suffix. The test folder contains one yaml file, which wasn't being run because of that. Unsurprisingly the test fails, but this was not because the underlying functionality was broken, but rather because the test was setup incorrectly (most likely due to overly aggressive simplification of the test data on my part). Therefore this patch also tweaks the test inputs in order to test what they are supposed to test, and also updates some other breakpad tests (because they depend on the same inputs as this one) to be more realistic -- specifically it avoids putting symbols to the first page of the module, as that's where normally the COFF header would reside.
2020-02-24[lldb/test] simplify basic-elf.yamlPavel Labath
Explicit dynsym/dynstr sections were added in a6370d5 to compensate for a yaml2obj change D74764. This test doesn't need those sections, so instead I just delete the explicit section blocks, and also the "DynamicSymbols" block, which triggers their implicit generation.
2020-02-22[lldb][test] - Update basic-elf.yaml to fix build bot.Georgii Rymar
D74764 (https://reviews.llvm.org/rG31f2ad9c368d47721508cbd0d120d626f9041715) changed the behavior of the yaml2obj. Now it assigns virtual addresses for allocatable sections. SymbolFile/Breakpad/symtab.test started to fail after this change: (http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/5520/steps/test/logs/stdio) Command Output (stderr): -- /home/worker/lldb-x86_64-debian/lldb-x86_64-debian/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab.test:6:10: error: CHECK: expected string not found in input # CHECK: Symtab, file = {{.*}}symtab.out, num_symbols = 5: ^ <stdin>:15:1: note: scanning from here Symtab, file = /home/worker/lldb-x86_64-debian/lldb-x86_64-debian/build/tools/lldb/test/SymbolFile/Breakpad/Output/symtab.out, num_symbols = 6: ^ <stdin>:15:99: note: possible intended match here Symtab, file = /home/worker/lldb-x86_64-debian/lldb-x86_64-debian/build/tools/lldb/test/SymbolFile/Breakpad/Output/symtab.out, num_symbols = 6: For now I've updated the basic-elf.yaml so that now it produce the same layout as before D74764. Breakpad/symtab.test should be updated it seems.
2019-11-05lldb/breakpad: add suppport for the "x86_64h" architecturePavel Labath
2019-10-31minidump: Create memory regions from the sections of loaded modulesPavel Labath
Summary: Not all minidumps contain information about memory permissions. However, it is still important to know which regions of memory contain potentially executable code. This is particularly important for unwinding on win32, as the default unwind method there relies on scanning the stack for things which "look like" code pointers. This patch enables ProcessMinidump to reconstruct the likely permissions of memory regions using the sections of loaded object files. It only does this if we don't have a better source (memory info list stream, or linux /proc/maps) for this information, and only if the information in the object files does not conflict with the information in the minidump. Theoretically that last bit could be improved, since the permissions obtained from the MemoryList streams is also only a very rough guess, but it did not seem worthwhile to complicate the implementation because of that because there will generally be no overlap in practice as the MemoryList will contain the stack contents and not any module data. The patch adds a test checking that the module section permissions are entered into the memory region list, and also a test which demonstrate that now the unwinder is able to correctly find return addresses even in minidumps without memory info list streams. There's one TODO left in this patch, which is that the "memory region" output does not give any indication about the "don't know" values of memory region permissions (it just prints them as if they permission bit was set). I address this in a follow up. Reviewers: amccarth, clayborg Subscribers: mgrang, lldb-commits Differential Revision: https://reviews.llvm.org/D69105
2019-10-18Add REQUIRES: x86 to more tests which need the x86 llvm target builtPavel Labath
llvm-svn: 375234
2019-10-10unwind-via-stack-win.yaml: update for changes in yaml formatPavel Labath
llvm-svn: 374353
2019-10-09Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere
The original patch got reverted because it broke `check-lldb` on a clean build. This fixes that. llvm-svn: 374201
2019-10-09Revert [test] Split LLDB tests into API, Shell & UnitAdrian Prantl
as it appears to have broken check-lldb. This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82) llvm-svn: 374187
2019-10-09[test] Split LLDB tests into API, Shell & UnitJonas Devlieghere
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184