aboutsummaryrefslogtreecommitdiff
path: root/lldb
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09[lldb] Overwrite existing LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLESCyndy Ishida1-1/+1
on apple-linux
2024-04-08[lldb] Add swig doc for SBProcess address mask methodsJason Molenda1-0/+41
Add descriptions of `GetAddressMask`, `SetAddressMask`, `SetAddressableBits`, and `FixAddress` SBProcess methods.
2024-04-08[lldb] [NFC] Fix swig docstring annotations (#88073)Jason Molenda4-54/+48
Some of the SB API method description docstrings for swing are annotated as `%feature("autodoc")` - but `"autodoc"` annotations are only to substitute a string showing the arguments and return variables - either in a single line, or in multiple lines. SBMemoryRegionInfo used `"autodoc"` correctly describing the parameters and return type, but then it added a description too which is not correct either. Change all of these that are adding a method description to use `%feature("docstring")` instead. There were a half dozen instances where `"autodoc"` was correctly being used and we have overriden the parameter and return types with a more readable version.
2024-04-07[cmake] Prevent implicitly passing `-no_exported_symbols` (#87846)Cyndy Ishida1-0/+1
* It is possible to setup llvm-project builds without going through `llvm/CMakeList.txt` so the fatal error handling should be smarter. * Disable option on Apple style lldb-linux builds.
2024-04-05[cmake] Build executables with -no_exported_symbols when building Apple ↵Cyndy Ishida1-0/+1
toolchain (#87684) Building the Apple way turns off plugin support, meaning we don't need to export unloadable symbols from all executables. While deadstripping effects aren't expected to change, enabling this across all tools prevents the creation of export tries. This saves us ~3.5 MB in just the universal build of `clang`.
2024-04-04Revert "Debuginfod Testing & fixes: 3rd times the charm? (#87676)"Shubham Rastogi10-515/+17
This reverts commit d6713ad80d6907210c629f22babaf12177fa329c. This changed was reverted because of greendragon failures such as Unresolved Tests (2): lldb-api :: debuginfod/Normal/TestDebuginfod.py lldb-api :: debuginfod/SplitDWARF/TestDebuginfodDWP.py
2024-04-04Debuginfod Testing & fixes: 3rd times the charm? (#87676)Kevin Frei10-17/+515
I believe I've got the tests properly configured to only run on Linux x86(_64), as I don't have a Linux AArch64/Arm device to diagnose what's going wrong with the tests (I suspect there's some issue with generating `.note.gnu.build-id` sections...) The actual code fixes have now been reviewed 3 times: https://github.com/llvm/llvm-project/pull/79181 (moved shell tests to API tests), https://github.com/llvm/llvm-project/pull/85693 (Changed some of the testing infra), and https://github.com/llvm/llvm-project/pull/86812 (didn't get the tests configured quite right). The Debuginfod integration for symbol acquisition in LLDB now works with the `executable` and `debuginfo` Debuginfod network requests working properly for normal, `objcopy --only-keep-debug` stripped, split-dwarf, and `objcopy --only-keep-debug` stripped *plus* split-dwarf symbols/binaries. The reasons for the multiple attempts have been tests on platforms I don't have access to (Linux AArch64/Arm + MacOS x86_64). I believe I've got the tests properly disabled for everything except for Linux x86(_64) now. I've built & tested on MacOS AArch64 and Linux x86_64. --------- Co-authored-by: Kevin Frei <freik@meta.com>
2024-04-03[lldb] Set static Module's load addresses via ObjectFile (#87439)Jason Molenda1-24/+16
This is a followup to https://github.com/llvm/llvm-project/pull/86359 "[lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (#86359)" where I treat LLVM_COV segments in a Mach-O binary as non-loadable. There is another codepath in `DynamicLoaderStatic::LoadAllImagesAtFileAddresses` which is called to set the load addresses for a Module to the file addresses. It has no logic to detect a segment that is not loaded in virtual memory (ObjectFileMachO::SectionIsLoadable), so it would set the load address for this LLVM_COV segment to the file address and shadow actual code, breaking lldb behavior. This method currently sets the load address for any section that doesn't have a load address set already. This presumes that a Module was added to the Target, some mechanism set the correct load address for SOME segments, and then this method is going to set the other segments to a no-slide value, assuming they were forgotten. ObjectFile base class doesn't, today, vend a SectionIsLoadable method, but we do have ObjectFile::SetLoadAddress and at a higher level, Module::SetLoadAddress, when we're setting the same slide to all segments. That's the behavior we want in this method. If any section has a load address, we don't touch this Module. Otherwise we set all sections to have a load address that is the same as the file address. I also audited the other parts of lldb that are calling SectionList::SectionLoadAddress and looked if they should be more correctly using Module::SetLoadAddress for the entire binary. But in most cases, we have the potential for different slides for different sections so this section-by-section approach must be taken. rdar://125800290
2024-04-03Revert "DebugInfoD issues, take 2" (#87583)Chelsea Cassanova10-506/+17
Reverts llvm/llvm-project#86812. This commit caused a regression on the x86_64 MacOS buildbot: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/784/
2024-04-03DebugInfoD issues, take 2 (#86812)Kevin Frei10-17/+506
The previous diff (and it's subsequent fix) were reverted as the tests didn't work properly on the AArch64 & ARM LLDB buildbots. I made a couple more minor changes to tests (from @clayborg's feedback) and disabled them for non Linux-x86(_64) builds, as I don't have the ability do anything about an ARM64 Linux failure. If I had to guess, I'd say the toolchain on the buildbots isn't respecting the `-Wl,--build-id` flag. Maybe, one day, when I have a Linux AArch64 system I'll dig in to it. From the reverted PR: I've migrated the tests in my https://github.com/llvm/llvm-project/pull/79181 from shell to API (at @JDevlieghere's suggestion) and addressed a couple issues that were exposed during testing. The tests first test the "normal" situation (no DebugInfoD involvement, just normal debug files sitting around), then the "no debug info" situation (to make sure the test is seeing failure properly), then it tests to validate that when DebugInfoD returns the symbols, things work properly. This is duplicated for DWP/split-dwarf scenarios. --------- Co-authored-by: Kevin Frei <freik@meta.com>
2024-04-03[lldb] Correct byte order check for 128 bit integer registersDavid Spickett1-1/+1
Size was clearly not correct here. This call has been here since the initial reformat of all of lldb so it has likely always been incorrect. (although registers don't typically have an endian, they are just values, in the remote protocol register data is in target endian) This might have been a problem for Neon registers on big endian AArch64, but only if the debug server describes them as integers. lldb-server does not, they've always been vectors which doesn't take this code path. Not adding a test because the way I've mocked up a big endian target in the past is using s390x as the architecture. This apparently has some form of vector extension that may be 128 bit but lldb doesn't support it.
2024-04-03[lldb][SymbolFileDWARFDebugMap] Introduce enum to indicate whether to ↵Michael Buch3-40/+52
continue iteration of object files (#87344) This patch introduces a new `IterationMarker` enum (happy to take alternative name suggestions), which callbacks, like the one in `SymbolFileDWARFDebugMap::ForEachSymbolFile`, can return in order to indicate whether the caller should continue iterating or bail. For now this patch just changes the `ForEachSymbolFile` callback to use this new enum. In the future we could change the various `DWARFIndex::GetXXX` callbacks to do the same. This makes the callbacks easier to read and hopefully reduces the chance of bugs like https://github.com/llvm/llvm-project/pull/87177.
2024-04-02[lldb] clang-format AuxVector.h (#85057)David Spickett1-15/+15
Doing this in its own commit so the intent of 2f48a1ff574573e7be170d39ab8de79d9db8bcea is clearer.
2024-04-02[lldb][FreeBSD] Add FreeBSD specific AT_HWCAP value (#84147)David Spickett1-2/+11
While adding register fields I realised that the AUXV values for Linux and FreeBSD disagree here. So I've added a FreeBSD specific HWCAP value that I can use from FreeBSD specific code. The alternative is translating GetAuxValue calls depending on platform, which requires that we know what we are at all times. Another way would be to convert the entries' values when we construct the AuxVector but the platform specific call that reads the data just returns a raw array. So adding another layer here is more disruption.
2024-04-01Add uncovered enums in switches caused by ↵David Blaikie1-0/+4
9434c083475e42f47383f3067fe2a155db5c6a30 These are probably actually unreachable - perhaps an lldb developer would be interested in rephrasing this change to move the new cases into some unreachable/unsupported bucket, rather than my half-hearted guess at what the desired behavior would be (completely untested, because they're probably untestable/unreachable - maybe debugging from modules?)
2024-04-01[lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (#87263)Jordan Rupprecht2-26/+28
We check if the next character after `N.` is `*` before we check its length. Using `split` on the string is cleaner and less error prone than using indices with `find` and `substr`. Note: this does not make `N.` mean anything, it just prevents assertion failures. `N.` is treated the same as an unrecognized breakpoint name: ``` (lldb) breakpoint enable 1 1 breakpoints enabled. (lldb) breakpoint enable 1.* 1 breakpoints enabled. (lldb) breakpoint enable 1. 0 breakpoints enabled. (lldb) breakpoint enable xyz 0 breakpoints enabled. ``` Found via LLDB fuzzers.
2024-03-31Fix DWARF locations when we have large .dwp files. (#87164)Greg Clayton1-8/+8
We have the ability to load .dwp files with a .debug_info.dwo section that exceeds 4GB. There were 4 locations that were using 32 bit offsets and lengths to extract variable locations, and if a DIE was over the 4GB barrier, we would truncate the block offset for the variable locations and the variable expression would be garbage. This fixes the issues. It isn't possible to add a test for this as we don't want to create a 4GB .dwp file on test machines.
2024-03-31[lldb] Fix type lookup in DWARF .o files via debug map (#87177)Pablo Busse5-16/+26
An inverted condition causes `SymbolFileDWARFDebugMap::FindTypes` to bail out after inspecting the first .o file in each module. The same kind of bug is found in `SymbolFileDWARFDebugMap::ParseDeclsForContext`. Correct both early exit conditions and add a regression test for lookup of up a type defined in a secondary compilation unit. Fixes #87176
2024-03-28[LLDB] Add APFloat helper functions to Scalar class. (#86862)cmtice3-0/+105
This adds the ability to create a Scalar from an APFloat, and to create an APFloat from an APSInt or another APFloat.
2024-03-28[lldb] Remove cmake check for pexpect with LLDB_TEST_USE_VENDOR_PACKAGES ↵Jordan Rupprecht1-17/+0
(#86962) The commit 8bed754c2f965c8cbbb050be6f650b78f7fd78a6 was intended to support the use case where users want to run all the LLDB tests in an environment where pexpect is not installed. Those users can build with `-DLLDB_TEST_USER_ARGS=--skip-category=pexpect` to skip pexpect tests, *but* because we still fail in cmake configuration, they must use `-DLLDB_TEST_USE_VENDOR_PACKAGES=ON` to avoid failing due to pexpect not being available. I would like to remove `LLDB_TEST_USE_VENDOR_PACKAGES` now, but first I'd like to make sure users w/o pexpect can pass CI with `-DLLDB_TEST_USE_VENDOR_PACKAGES=OFF -DLLDB_TEST_USER_ARGS=--skip-category=pexpect`. Once that is done, I am not aware of any other issues caused by the previous commits, so the third party tree should be safe to remove.
2024-03-27[lldb] Avoid deadlock by unlocking before invoking callbacks (#86888)Jonas Devlieghere1-39/+45
Avoid deadlocks in the Alarm class by releasing the lock before invoking callbacks. This deadlock manifested itself in the ProgressManager: 1. On the main thread, the ProgressManager acquires its lock in ProgressManager::Decrement and calls Alarm::Create. 2. On the main thread, the Alarm acquires its lock in Alarm::Create. 3. On the alarm thread, the Alarm acquires its lock after waiting on the condition variable and calls ProgressManager::Expire. 4. On the alarm thread, the ProgressManager acquires its lock in ProgressManager::Expire. Note how the two threads are acquiring the locks in different orders. Deadlocks can be avoided by always acquiring locks in the same order, but since the two mutexes here are private implementation details, belong to different classes, that's not straightforward. Luckily, we don't need to have the Alarm mutex locked when invoking the callbacks. That exactly how this patch solves the issue.
2024-03-27[lldb] [ObjC runtime] Don't cast to signed when left shifting (#86605)Jason Molenda1-1/+1
This is fixing a report from ubsan which I don't think is super high value, but our testsuite hits it on TestDataFormatterObjCNSContainer.py so I'd like to work around it. We are getting ``` runtime error: left shift of negative value -8827055269646171913 3159 int64_t data_payload_signed = 3160 ((int64_t)((int64_t)unobfuscated -> 3161 << m_objc_debug_taggedpointer_ext_payload_lshift) >> 3162 m_objc_debug_taggedpointer_ext_payload_rshift); ``` At this point `unobfuscated` is 0x85800000000000f7 and `m_objc_debug_taggedpointer_ext_payload_lshift` is 9, so `(int64_t)0x85800000000000f7<<9` shifts off the "sign" bit and then some zeroes etc, and that's how we get this error. We're only trying to extract some bits in the middle of the doubleword, so the fact that we're "losing" the sign is not a bug. Change the inner cast to (uint64_t).
2024-03-27[lldb] Revive shell test after updating UnwindTable (#86770)Jason Molenda4-0/+78
In commit 2f63718f8567413a1c596bda803663eb58d6da5a Author: Jason Molenda <jmolenda@apple.com> Date: Tue Mar 26 09:07:15 2024 -0700 [lldb] Don't clear a Module's UnwindTable when adding a SymbolFile (#86603) I stopped clearing a Module's UnwindTable when we add a SymbolFile to avoid the memory management problems with adding a symbol file asynchronously while the UnwindTable is being accessed on another thread. This broke the target-symbols-add-unwind.test shell test on Linux which removes the DWARF debub_frame section from a binary, loads it, then loads the unstripped binary with the DWARF debug_frame section and checks that the UnwindPlans for a function include debug_frame. I originally decided that I was willing to sacrifice the possiblity of additional unwind sources from a symbol file because we rely on assembly emulation so heavily, they're rarely critical. But there are targets where we we don't have emluation and rely on things like DWARF debug_frame a lot more, so this probably wasn't a good choice. This patch adds a new UnwindTable::Update method which looks for any new sources of unwind information and adds it to the UnwindTable, and calls that after a new SymbolFile has been added to a Module.
2024-03-27[lldb][Dwarf] Add missing timer when parsing .debug_abbrev. (#86568)Zequan Wu1-0/+1
The time spent on parsing `.debug_abbrev` is also part of debug info parsing time.
2024-03-27[lldb][nfc] Delete unused variable (#86740)Felipe de Azevedo Piovezan1-1/+0
This was made unused by d9ec4b24a84addb8bd77b5d9dd990181351cf84c.
2024-03-26[lldb] Implement coalescing of disjoint progress events (#84854)Jonas Devlieghere4-35/+167
This implements coalescing of progress events using a timeout, as discussed in the RFC on Discourse [1]. This PR consists of two commits which, depending on the feedback, I may split up into two PRs. For now, I think it's easier to review this as a whole. 1. The first commit introduces a new generic `Alarm` class. The class lets you to schedule a function (callback) to be executed after a given timeout expires. You can cancel and reset a callback before its corresponding timeout expires. It achieves this with the help of a worker thread that sleeps until the next timeout expires. The only guarantee it provides is that your function is called no sooner than the requested timeout. Because the callback is called directly from the worker thread, a long running callback could potentially block the worker thread. I intentionally kept the implementation as simple as possible while addressing the needs for the `ProgressManager` use case. If we want to rely on this somewhere else, we can reassess whether we need to address those limitations. 2. The second commit uses the Alarm class to coalesce progress events. To recap the Discourse discussion, when multiple progress events with the same title execute in close succession, they get broadcast as one to `eBroadcastBitProgressCategory`. The `ProgressManager` keeps track of the in-flight progress events and when the refcount hits zero, the Alarm class is used to schedule broadcasting the event. If a new progress event comes in before the alarm fires, the alarm is reset (and the process repeats when the new progress event ends). If no new event comes in before the timeout expires, the progress event is broadcast. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
2024-03-26[lldb] Remove test for add-symbol-file adds unwind sourceJason Molenda1-27/+0
In commit 2f63718f8567413a1c596bda803663eb58d6da5a Author: Jason Molenda <jmolenda@apple.com> Date: Tue Mar 26 09:07:15 2024 -0700 [lldb] Don't clear a Module's UnwindTable when adding a SymbolFile (#86603) I changed lldb to not clear a Module's UnwindTable when we add a SymbolFile to a binary, because the added benefit is marginal, and handling this reconstruction correctly is difficult. This test was written to explicitly create a test without unwind info in the binary, then add a symbol file with the unwind info, and check that it is present. I've intentionally broken this, so I'm removing the test.
2024-03-26[lldb] Fix warning: comparison of unsigned expression in >= 0 is always trueJonas Devlieghere1-1/+1
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp:1195:15: warning: comparison of unsigned expression in ‘>= 0’ is always true 1195 | if (weekday >= 0 && weekday < 7) | ~~~~~~~~^~~~
2024-03-26[lldb] Don't clear a Module's UnwindTable when adding a SymbolFile (#86603)Jason Molenda1-6/+1
Fixing a crash in lldb when `symbols.auto-download` setting is enabled. When doing a backtrace, this feature has lldb search for a SymbolFile for stack frames when we are backtracing, and add them either synchoronously or asynchronously, depending on the specific setting used. Module::SetSymbolFileFileSpec clears the Module's UnwindTable, once we find a new SymbolFile. We may be adding a source of unwind information that we did not have when lldb was working only with the executable binary. What happens in practice is that we're using a reference to the Module's UnwindTable, and then the other thread getting the SymbolFile clears it and now the first thread is referring to freed memory and we can crash. When built with address sanitizer, it crashes much more reliably. Given that unwind information used for exception handling -- eh_frame, compact unwind -- is present in executable binaries, the only thing we're likely to *add* would be DWARF's `debug_frame` if that was also available. The actual value of re-creating the UnwindTable when we have added a SymbolFile is not large. I also tried fixing this by changing the Module to have a shared_ptr to the UnwindTable, so we could have two different UnwindTable's in use simultaneously for a brief period. This would be fine TODAY, but it introduces a very subtle bug that someone will have a heck of a time figuring out in the future. In the end, I believe the safest approach is to sacrifice the possible marginal gain of reconstructing the UnwindTable once a SymbolFile has been added, to sidestep this whole problem area. Also, in `Module::GetUnwindTable()`, call `DownloadSymbolFileAsync` before we create the UnwindTable for the first time, in case the symbol file is fetched synchronously, we will have it for that possible marginal gain.
2024-03-25Make the correct (5 argument) form of the command definition be the primary ↵jimingham1-10/+18
one suggested in the docs (#86593) This has been available for years now, so it should be safe to always use it.
2024-03-25Revert "[lldb] Implement coalescing of disjoint progress events (#84854)"Jonas Devlieghere4-159/+32
This reverts commit 930f64689c1fb487714c3836ffa43e49e46aa488 as it's failing on the Linux bots.
2024-03-25Add register lookup as another fallback computation for address-expressions ↵jimingham4-7/+99
(#85492) The idea behind the address-expression is that it handles all the common expressions that produce addresses. It handles actual valid expressions that return a scalar, and it handles useful cases that the various source languages don't support. At present, the fallback handles: <symbol_name>{+-}<offset> which isn't valid C but is very handy. This patch adds handling of: $<reg_name> and $<reg_name>{+-}<offset> That's kind of pointless in C because the C expression parser handles that expression already. But some languages don't have a straightforward way to represent register values like this (swift) so having this fallback is quite a quality of life improvement. I added a test which tests that I didn't mess up either of these fallbacks, though it doesn't test the actually handling of registers that I added, since the expression parser for C succeeds in that case and returns before this code gets run. I will add a test on the swift fork for that checks that this works the same way for a swift frame after this check.
2024-03-25[lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (#86359)Jason Molenda2-0/+13
It is possible to gather code coverage in a firmware environment, where the __LLVM_COV segment will not be mapped in memory but does exist in the binary, see https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf The __LLVM_COV segment in the binary happens to be at the same address as the __DATA segment, so if lldb treats this segment as loaded, it shadows the __DATA segment and address->symbol resolution can fail. For these non-userland code cases, we need to mark __LLVM_COV as not a loadable segment. rdar://124475661
2024-03-25[lldb] Implement coalescing of disjoint progress events (#84854)Jonas Devlieghere4-32/+159
This implements coalescing of progress events using a timeout, as discussed in the RFC on Discourse [1]. This PR consists of two commits which, depending on the feedback, I may split up into two PRs. For now, I think it's easier to review this as a whole. 1. The first commit introduces a new generic `Alarm` class. The class lets you to schedule a function (callback) to be executed after a given timeout expires. You can cancel and reset a callback before its corresponding timeout expires. It achieves this with the help of a worker thread that sleeps until the next timeout expires. The only guarantee it provides is that your function is called no sooner than the requested timeout. Because the callback is called directly from the worker thread, a long running callback could potentially block the worker thread. I intentionally kept the implementation as simple as possible while addressing the needs for the `ProgressManager` use case. If we want to rely on this somewhere else, we can reassess whether we need to address those limitations. 2. The second commit uses the Alarm class to coalesce progress events. To recap the Discourse discussion, when multiple progress events with the same title execute in close succession, they get broadcast as one to `eBroadcastBitProgressCategory`. The `ProgressManager` keeps track of the in-flight progress events and when the refcount hits zero, the Alarm class is used to schedule broadcasting the event. If a new progress event comes in before the alarm fires, the alarm is reset (and the process repeats when the new progress event ends). If no new event comes in before the timeout expires, the progress event is broadcast. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
2024-03-23Revert "DebugInfoD tests + fixing issues exposed by tests (#85693)"Muhammad Omair Javaid10-537/+17
This reverts commit 6d939a6ec69adf284cdbef2034b49fd02ba503fc. This broke following LLDB bots: https://lab.llvm.org/buildbot/#/builders/96/builds/54867 https://lab.llvm.org/buildbot/#/builders/17/builds/50824
2024-03-23Revert "Missed a null-ptr check in previous PR for Debuginfod testing (#86292)"Muhammad Omair Javaid1-1/+1
This reverts commit b1575f9082071702bd6aaa2600ce9fe011a091e9.
2024-03-22Missed a null-ptr check in previous PR for Debuginfod testing (#86292)Kevin Frei1-1/+1
@GeorgeHuyubo noticed an unchecked shared pointer result in https://github.com/llvm/llvm-project/pull/85693/. This is the fix for that issue. Co-authored-by: Kevin Frei <freik@meta.com>
2024-03-21[lldb] Handle clang::Language::CIR (#86234)Kazu Hirata1-0/+1
commit e66b670f3bf9312f696e66c31152ae535207d6bb Author: Nathan Lanza <nathanlanza@gmail.com> Date: Thu Mar 21 19:53:48 2024 -0400 triggers: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:478:16: error: enumeration value 'CIR' not handled in switch [-Werror,-Wswitch] This patch teaches lldb to handle clang::Language::CIR the same way as clang::Language::LLVM_IR.
2024-03-21DebugInfoD tests + fixing issues exposed by tests (#85693)Kevin Frei10-17/+537
Finally getting back to Debuginfod tests: I've migrated the tests in my [earlier PR](https://github.com/llvm/llvm-project/pull/79181) from shell to API (at @JDevlieghere's suggestion) and addressed a couple issues that came about during testing. The tests first test the "normal" situation (no DebugInfoD involvement, just normal debug files sitting around), then the "no debug info" situation (to make sure the test is seeing failure properly), then it tests to validate that when Debuginfod returns the symbols, things work properly. This is duplicated for DWP/split-dwarf scenarios. --------- Co-authored-by: Kevin Frei <freik@meta.com>
2024-03-21[lldb] Add missing initialization in LineEntry ctorJonas Devlieghere1-2/+4
2024-03-21[lldb][progress][NFC] Clarify Doxygen comments for `details` field (#86002)Chelsea Cassanova1-1/+5
The Doxygen comments for the `details` field of a progress report currently does not specify that this field will act as the initial set of details for a progress report that gets updated with `Progress::Increment()`. This commit clarifies this.
2024-03-21[lldb] Reland: Store SupportFile in FileEntry (NFC) (#85892)Jonas Devlieghere27-60/+69
This is another step towards supporting DWARF5 checksums and inline source code in LLDB. This is a reland of #85468 but without the functional change of storing the support file from the line table (yet).
2024-03-20[lldb] Invert relationship between Process and AddressableBits (#85858)Alex Langford6-23/+43
AddressableBits is in the Utility module of LLDB. It currently directly refers to Process, which is from the Target LLDB module. This is a layering violation which concretely means that it is impossible to link anything that uses Utility without it also using Target as well. This is generally not an issue for LLDB (since everything is built together) but it may make it difficult to write unit tests for AddressableBits later on.
2024-03-20[lldb] Remove process restart prompt from TestSourceManager (#85861)Alex Langford1-5/+4
In TestSourceManager, test_artificial_source_location will give the process restart prompt if you run the test individually. The reason is that we run the process twice: first using a convenience function to run to a specific breakpoint and then again to check for a specific message emitted when you hit the breakpoint. Instead of running twice and making the test difficult to run individually, we can just check for the specific messages using other commands.
2024-03-20[lldb] Omit --show-globals in `help target var` (#85855)Felipe de Azevedo Piovezan2-14/+22
This option doesn't exist. It is currently displayed by `help target var` due to a bug introduced by 41ae8e7445 in 2018. Some code for `target var` and `frame var` is shared, and some hard-code constants are used in order to filter out options that belong only to `frame var`. However, the aforementioned commit failed to update these constants properly. This patch addresses the issue by having a _single_ place where the filtering of options needs to be done.
2024-03-20Silence -Wswitch warningsBenjamin Kramer1-0/+3
TypeSystemClang.cpp:4074:11: error: enumeration value 'CountAttributed' not handled in switch [-Werror,-Wswitch] 4074 | switch (qual_type->getTypeClass()) { | ^~~~~~~~~~~~~~~~~~~~~~~~~ TypeSystemClang.cpp:4755:11: error: enumeration value 'CountAttributed' not handled in switch [-Werror,-Wswitch] 4755 | switch (qual_type->getTypeClass()) { | ^~~~~~~~~~~~~~~~~~~~~~~~~ TypeSystemClang.cpp:5088:11: error: enumeration value 'CountAttributed' not handled in switch [-Werror,-Wswitch] 5088 | switch (qual_type->getTypeClass()) { | ^~~~~~~~~~~~~~~~~~~~~~~~~
2024-03-19[lldb] Outline Doxygen comments in LineEntry.h (NFC)Jonas Devlieghere1-25/+34
Outline and correct Doxygen comments in LineEntry.
2024-03-19Revert "[lldb] Update SymbolFilePDBTests for LineEntry change (d5a277d309e9)"Jonas Devlieghere1-1/+1
This reverts commit 113214e15b5ce3f3ec313eb1fa91a7038ecd072f as the corresponding change was reverted in a289f66.
2024-03-19Revert "[lldb] Store SupportFile in FileEntry (NFC)" (#85885)Jonas Devlieghere26-89/+71
Reverts llvm/llvm-project#85468 because @slackito reports this broke stepping in one of their tests [1] and this patch was meant to be NFC. [1] https://github.com/llvm/llvm-project/commit/d5a277d309e92b1d3e493da6036cffdf815105b1#commitcomment-139991120
2024-03-20[lldb/API] Add missing `eBroadcastBitSymbolsChanged` to SBTarget (NFC) (#85883)Med Ismail Bennani1-1/+2
This patch exposes the missing `eBroadcastBitSymbolsChanged` event bit in `SBTarget`. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>