[lldb] Reduce the stack alignment requirements for the Windows x86_64 ABIThis fixes https://github.com/llvm/llvm-project/issues/56095.Differential Revision: https://reviews.llvm.org/D129455
Fix lldb test failure due to D93082.Rename the basic block symbols in the test to reflect the new names.
[lldb] [POSIX-DYLD] Add libraries from initial rendezvous brkpt hitExplicitly consider the libraries reported on the initial rendezvousbreakpoint hit added. This is necessary on FreeBSD since the
[lldb] [POSIX-DYLD] Add libraries from initial rendezvous brkpt hitExplicitly consider the libraries reported on the initial rendezvousbreakpoint hit added. This is necessary on FreeBSD since the dynamicloader issues only a single 'consistent' state rendezvous breakpoint hitfor all the libraries present in DT_NEEDED. It is also helpful on Linuxwhere it ensures that ld-linux is considered loaded as wellas the shared system libraries reported afterwards.Reenable memory maps on FreeBSD since this fixed the issue triggeredby them.Differential Revision: https://reviews.llvm.org/D92187
show more ...
Revert "[lldb] [POSIX-DYLD] Add libraries from initial eTakeSnapshot action"This reverts commit 09b08833f301ea375137931d26b7193101f82ceb.This code is wrong on Linux, and causes ld-linux and linux
Revert "[lldb] [POSIX-DYLD] Add libraries from initial eTakeSnapshot action"This reverts commit 09b08833f301ea375137931d26b7193101f82ceb.This code is wrong on Linux, and causes ld-linux and linux-vdso to bereported twice. I need to work on it more.
[lldb] [POSIX-DYLD] Add libraries from initial eTakeSnapshot actionExplicitly consider the libraries reported on the initial eTakeSnapshotaction added, through adding them to the added soentry lis
[lldb] [POSIX-DYLD] Add libraries from initial eTakeSnapshot actionExplicitly consider the libraries reported on the initial eTakeSnapshotaction added, through adding them to the added soentry listin DYLDRendezvous::SaveSOEntriesFromRemote(). This is necessaryon FreeBSD since the dynamic loader issues only a single 'consistent'state rendezvous breakpoint hit for all the libraries presentin DT_NEEDED (while Linux issues an added-consistent event pair).Reenable memory maps on FreeBSD since this fixed the issue triggeredby them.Differential Revision: https://reviews.llvm.org/D92187
[lldb] [test] Update XFAILs/skips for FreeBSDUpdate expected failures and test skips based on common resultsfor the old and new FreeBSD plugins.
Test to check backtraces with machine function splitting.clang supports option -fsplit-machine-functions and this test checks if thebacktraces are sane when functions are split.With -fsplit-mach
Test to check backtraces with machine function splitting.clang supports option -fsplit-machine-functions and this test checks if thebacktraces are sane when functions are split.With -fsplit-machine-functions, a function with profiles can get split into 2parts, the original function containing hot code and a cold part as determinedby the profile info and the cold cutoff threshold.. The cold part gets the".cold" suffix to disambiguate its symbol from the hot part and can be placedarbitrarily in the address space.This test checks if the back-trace looks correct when the cold part is executed.Differential Revision: https://reviews.llvm.org/D90081
This test includes a source that will produce basic blocks and hence sections with -fbasic-block-sections=all.The test reorders the basic blocks to be dis-contiguous in the address space and checks
This test includes a source that will produce basic blocks and hence sections with -fbasic-block-sections=all.The test reorders the basic blocks to be dis-contiguous in the address space and checks if the back trace contains the right symbol.Reviewed By: labathDifferential Revision: https://reviews.llvm.org/D89179
[lldb/Test] Disable eh-frame-augment-noop.test on macOSThe test fails on Darwin because a different Asynchronous UnwindPlan ischosen: Asynchronous (not restricted to call-sites) UnwindPlan is '
[lldb/Test] Disable eh-frame-augment-noop.test on macOSThe test fails on Darwin because a different Asynchronous UnwindPlan ischosen: Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly insn profiling'`instead of what the test expects: Asynchronous (not restricted to call-sites) UnwindPlan is 'eh_frame CFI'
[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmentedSummary:This fixes a bug in the logic for choosing the unwind plan. Based on thecomment in UnwindAssembly-x86, the int
[lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmentedSummary:This fixes a bug in the logic for choosing the unwind plan. Based on thecomment in UnwindAssembly-x86, the intention was that a plan whichdescribes the function epilogue correctly does not need to be augmented(and it should be used directly). However, the way this was implemented(by returning false) meant that the higher level code(FuncUnwinders::GetEHFrameAugmentedUnwindPlan) interpreted this as afailure to produce _any_ plan and proceeded with other fallback options.The fallback usually chosed for "asynchronous" plans was the"instruction emulation" plan, which tended to fall over on certainfunctions with multiple epilogues (that's a separate bug).This patch simply changes the function to return true, which signals thecaller that the unmodified plan is ready to be used.The attached test case demonstrates the case where we would previouslyfall back to the instruction emulation plan, and unwind incorrectly --the test asserts that the "augmented" eh_frame plan is used, and thatthe unwind is correct.Reviewers: jasonmolenda, jankratochvilSubscribers: davide, echristo, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D82378
[lldb] Remove custom DWARF expression printing codeThe llvm DWARFExpression dump is nearly identical, but better -- forexample it does print a spurious space after zero-argument expressions.Some
[lldb] Remove custom DWARF expression printing codeThe llvm DWARFExpression dump is nearly identical, but better -- forexample it does print a spurious space after zero-argument expressions.Some parts of our code (variable locations) have been already switchedto llvm-based expression dumping. This switches the remainder: unwindplans and some unit tests.
[lldb/Driver] Exit with a non-zero exit code in case of error in batch mode.We have the option to stop running commands in batch mode when an erroroccurs. When that happens we should exit the driv
[lldb/Driver] Exit with a non-zero exit code in case of error in batch mode.We have the option to stop running commands in batch mode when an erroroccurs. When that happens we should exit the driver with a non-zero exitcode.Differential revision: https://reviews.llvm.org/D78825
[lldb] Fix eh-frame-small-fde test for changes in lldlld in 2bfee35 started emitting relocations for some intra-section jumpsbetween global symbols. This shifted the code around a bit, invalidatin
[lldb] Fix eh-frame-small-fde test for changes in lldlld in 2bfee35 started emitting relocations for some intra-section jumpsbetween global symbols. This shifted the code around a bit, invalidatingtext expectations.Change the symbols to local to keep the previous behavior.
[lldb] disable thread-step-out-ret-addr-check on windowsI'm unable to get this test working there.
[lldb] One more attempt to fix thread-step-out-ret-addr-check on windows
[lldb] Force the preprocessor to run in thread-step-out-ret-addr-check.testIt does not seem to run automatically on windows.
[lldb] [testsuite] Fix Linux fail: Unwind/thread-step-out-ret-addr-check.testD71372 introduced: `Unwind/thread-step-out-ret-addr-check.test` failing onFedora 30 Linux x86_64. [lldb] Add addition
[lldb] [testsuite] Fix Linux fail: Unwind/thread-step-out-ret-addr-check.testD71372 introduced: `Unwind/thread-step-out-ret-addr-check.test` failing onFedora 30 Linux x86_64. [lldb] Add additional validation on return address in 'thread step-out' https://reviews.llvm.org/D71372One problem is the underscored `_nonstandard_stub` in the `.s` file but not inthe LLDB command: (lldb) breakpoint set -n nonstandard_stub Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. (lldb) process launch Process 21919 exited with status = 0 (0x00000000) Process 21919 launched: '/home/jkratoch/redhat/llvm-monorepo-clangassert/tools/lldb/test/Unwind/Output/thread-step-out-ret-addr-check.test.tmp' (x86_64) (lldb) thread step-out error: invalid thread (lldb) _Another problem is that Fedora Linux has executable stack by default and allprograms indicate non-executable stack by `PT_GNU_STACK`, after fixing theunderscore I was getting: (lldb) thread step-out Process 22294 exited with status = 0 (0x00000000) (lldb) _A different approach was tried as: [lldb] Refactor thread-step-out-ret-addr-check test to use .data instead of stack variable https://reviews.llvm.org/D71789Differential revision: https://reviews.llvm.org/D71784
Temporarily restrict the test for D71372 to darwin till we fix it on other systems.
In 'thread step-out' command, only insert a breakpoint in executable memory.Previously, if the current function had a nonstandard stack layout/ABI, and had a validdata pointer in the location wher
In 'thread step-out' command, only insert a breakpoint in executable memory.Previously, if the current function had a nonstandard stack layout/ABI, and had a validdata pointer in the location where the return address is usually located, data corruptionwould occur when the breakpoint was written. This could lead to an incorrectly reportedcrash or silent corruption of the program's state. Now, if the above check fails, the command safely aborts.Differential Revision: https://reviews.llvm.org/D71372
[lldb/lit] Introduce %clang_host substitutionsSummary:This patch addresses an ambiguity in how our existing tests invoke thecompiler. Roughly two thirds of our current "shell" tests invoke theco
[lldb/lit] Introduce %clang_host substitutionsSummary:This patch addresses an ambiguity in how our existing tests invoke thecompiler. Roughly two thirds of our current "shell" tests invoke thecompiler to build the executables for the host. However, there is alsoa significant number of tests which don't build a host binary (becausethey don't need to run it) and instead they hardcode a certain target.We also have code which adds a bunch of default arguments to the %clangsubstitutions. However, most of these arguments only really make sensefor the host compilation. So far, this has worked mostly ok, because thearguments we were adding were not conflicting with the target-hardcodingtests (though they did provoke an occasional "argument unused" warning).However, this started to break down when we wanted to usetarget-hardcoding clang-cl tests (D69031) because clang-cl has asubstantially different command line, and it was getting very confusedby some of the arguments we were adding on non-windows hosts.This patch avoid this problem by creating separate %clang(xx,_cl)_hostsubstutitions, which are specifically meant to be used for compilinghost binaries. All funny host-specific options are moved there. Toensure that the regular %clang substitutions are not used for compilinghost binaries (skipping the extra arguments) I employ a littlehac^H^H^Htrick -- I add an invalid --target argument to the %clangsubstitution, which means that one has to use an explicit --target inorder for the compilation to succeed.Reviewers: JDevlieghere, aprantl, mstorsjo, espindolaSubscribers: emaste, arichardson, MaskRay, jfb, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D69619
Re-land "[test] Split LLDB tests into API, Shell & Unit"The original patch got reverted because it broke `check-lldb` on a cleanbuild. This fixes that.llvm-svn: 374201
Revert [test] Split LLDB tests into API, Shell & Unitas it appears to have broken check-lldb.This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82)llvm-svn: 374187
[test] Split LLDB tests into API, Shell & UnitLLDB has three major testing strategies: unit tests, tests that exercisethe SB API though dotest.py and what we currently call lit tests. Thelater is
[test] Split LLDB tests into API, Shell & UnitLLDB has three major testing strategies: unit tests, tests that exercisethe SB API though dotest.py and what we currently call lit tests. Thelater is rather confusing as we're now using lit as the driver for allthree types of tests. As most of this grew organically, the directorystructure in the LLDB repository doesn't really make this clear.The 'lit' tests are part of the root and among these tests there's aUnit and Suite folder for the unit and dotest-tests. This layout makesit impossible to run just the lit tests.This patch changes the directory layout to match the 3 testingstrategies, each with their own directory and their own configurationfile. This means there are now 3 directories under lit with 3corresponding 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 testsuites.Finally, this also renames the lit folder to `test` to match the LLVMrepository layout.Differential revision: https://reviews.llvm.org/D68606llvm-svn: 374184