34343 Commits

Author SHA1 Message Date
Alex Langford
014d5d51e1
[lldb] Change most tests to build with system libc++ on Darwin (#190034)
Today, on Darwin platforms, almost every test binary in our test suite
loads two copies of libc++, libc++abi, and libunwind. This is because
each of the test binaries explicitly link against a just-built libc++
(which is explicitly required on Darwin right now) but we don't take the
correct steps to replace the system libc++. Doing so is unnecessary and
potentially error-prone, so most tests should link against the system
libc++ where possible.

Background:
The lldb test suite has a collection of tests that rely on libc++
explicitly. The two biggest categories are data formatter tests (which
make sure that we can correctly display values for std types) and
import-std-module tests (which test that we can import the libc++ std
module). To make sure these tests are run, we require a just-built
libc++ to be used.

All of the test binaries link against the just-built libc++, so it gets
loaded. However, when any system library tries to load libc++, it
attempts to load the system one. dyld checks loaded libraries against
the request to load a new one using the full path, meaning anyone
linking against `/usr/lib/libc++.1.dylib` will get it no matter what
other libc++ dylib is already loaded.

The proper way to handle this is using `DYLD_LIBRARY_PATH`, which
switches dyld to checking the leaf name of a dylib instead of the full
path. In theory this works, but we run into an issue where the system
libc++ has additional symbols and many system libraries fail to load.
Louis Dionne added stubs in libc++abi for these missing symbols, meaning
it would be possible to make this scenario work. This may be useful for
the existing libc++ tests.
2026-04-06 15:42:22 -07:00
Piyush Jaiswal
e8566f83d2
[lldb][python] Add polymorphic __getitem__ to SBModuleSpecList for Pythonic indexing (#189125)
### Summary

`SBModuleSpecList` already supports `len()` and iteration via `__len__`
and `__iter__`, but is not subscriptable — `specs[0]` raises
`TypeError`.

This adds a `__getitem__` method that supports integer indexing (with
negative index support) and string lookup using `endswith()` matching,
which works for both Unix and Windows paths.

### Supported key types

| Key type | Example | Behavior |
|---|---|---|
| `int` | `specs[0]`, `specs[-1]` | Direct index with negative index
support |
| `str` | `specs['a.out']`, `specs['/usr/lib/liba.dylib']` | Lookup by
basename or partial/full path via `endswith()`. Returns first match or
`None` |

### Error handling

- **`IndexError`** for out-of-bounds integer indices
- **`TypeError`** for unsupported key types (e.g., `float`)
- **`None`** for string lookups with no match

### Before

```python
>>> specs = lldb.SBModuleSpecList.GetModuleSpecifications('/bin/ls')
>>> specs[0]
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: 'SBModuleSpecList' object is not subscriptable
```

### After

```python
>>> import lldb, re
>>> specs = lldb.SBModuleSpecList.GetModuleSpecifications('/bin/ls')

>>> specs[0]
file = '/bin/ls', arch = x86_64-*-linux, uuid = 3CCC0D8A-..., object size = 140928
>>> specs[-1]
file = '/bin/ls', arch = x86_64-*-linux, uuid = 3CCC0D8A-..., object size = 140928

>>> specs['ls']
file = '/bin/ls', arch = x86_64-*-linux, uuid = 3CCC0D8A-..., object size = 140928

>>> specs[999]
IndexError: list index out of range
>>> specs[1.5]
TypeError: unsupported index type: <class 'float'>
```

### Test plan

Added test_module_spec_list_indexing to TestSBModule.py covering:

- Positive and negative integer indexing
- Out-of-bounds raises IndexError
- Unsupported key type raises TypeError
- String lookup by basename and full path (endswith() matching)
- Missing key returns None

```
bin/llvm-lit -sv lldb/test/API/python_api/sbmodule/TestSBModule.py
```

```
PASS: LLDB :: test_GetObjectName_dwarf (TestSBModule.SBModuleAPICase)
PASS: LLDB :: test_GetObjectName_dwo (TestSBModule.SBModuleAPICase)
PASS: LLDB :: test_module_spec_list_indexing_dwarf (TestSBModule.SBModuleAPICase)
PASS: LLDB :: test_module_spec_list_indexing_dwo (TestSBModule.SBModuleAPICase)
----------------------------------------------------------------------
Ran 12 tests in 1.854s

OK (skipped=6)
```

Co-authored-by: Piyush Jaiswal <piyushjais@meta.com>
2026-04-06 14:48:18 -07:00
Sergei Barannikov
62ce560f68
[lldb] Remove some unreachable code (NFC) (#190529)
`isRISCV()` check always returns false because we only get here if
`min_op_byte_size` and `max_op_byte_size` are equal, which is not true
for RISC-V.
Also, replase `if (!got_op)` check with an `else`. The check is
equivalent to
`if (min_op_byte_size != max_op_byte_size)`, and the `if` above checks
for the opposite condition.
2026-04-07 00:32:17 +03:00
Jonas Devlieghere
950f1de70b
[lldb] Fix UUID thombstone Key (#190551)
This changes `DenseMapInfo<UUID>::getTombstoneKey()` to return a 1-byte
`{0xFF}` sentinel instead of the empty, default constructed UUID().
Returning the same key for the empty and tombstone value apparently
violates the `DenseMap` invariant.
2026-04-06 13:25:34 -07:00
Nerixyz
a2c9146da1
[lldb][NativePDB] Handle S_DEFRANGE_REGISTER_REL_INDIR (#190336)
Since #189401, LLVM and Clang generate `S_DEFRANGE_REGISTER_REL_INDIR`
for indirect locations. This adds support in LLDB.

The offset added after dereferencing is signed here - unlike in
`S_REGREL32_INDIR` (at least that's the assumption). So I updated
`MakeRegisterBasedIndirectLocationExpressionInternal` to handle the
signedness. This is the reason the MSVC test was changed here.

I didn't find a test case where LLVM emits the record with the `VFRAME`
register. Other than that, the clang test is similar to the MSVC one
except that the locations are slightly different.
2026-04-06 21:21:47 +02:00
Sergei Barannikov
11e7a49a58
[lldb] Remove VMRange class (NFC) (#190475)
We have a template class `Range` that provides similar functionality and
is much more widely used.
2026-04-05 18:39:44 +00:00
Sergei Barannikov
f8e394b6f8
[lldb] Fix section offset of synthesized entry point symbol (#190348)
In the non-ARM case, the offset was left unset, so the symbol
synthesized for the entry point pointed to the start of the containing
section.
As a drive-by change, simplify offset adjustment in ARM case.
2026-04-05 21:39:24 +03:00
Jonas Devlieghere
353ab41001
[lldb] Update error message in SocketTest::CreatePair (#190544) 2026-04-05 18:23:36 +00:00
Jonas Devlieghere
f866ef202c
[lldb] Bring more diagnostics in compliance with our coding standards (#190410)
The LLVM Coding Standards [1] specify that:

> [T]o match error message styles commonly produced by other tools,
> start the first sentence with a lowercase letter, and finish the last
> sentence without a period, if it would end in one otherwise.

Historically, that hasn't been something we've enforced in LLDB, but in
the past year or so I've started to pay more attention to this in code
reviews. This PR brings more error messages in compliance, further
increasing consistency.

I also adopted `createStringErrorV` where it improved the code as a
drive-by for lines I was already touching.

[1] https://llvm.org/docs/CodingStandards.html#error-and-warning-messages

Assisted-by: Claude Code
2026-04-05 10:41:47 -07:00
Sergei Barannikov
199ac48f73
[lldb] Replace ResolveValue() with GetScalar() in DWARFExpression (NFCI) (#185841)
Value::ResolveValue() only does something if the value has an associated
compiler type, which is never set on values used in DWARF expressions.
Simplify code by inlining the method.
2026-04-05 08:11:10 +00:00
Maarten Steevens
d400080063
[lldb] Inherit Host::GetEnvironment() when launching a wasm runtime (#190476)
Some WebAssembly runtimes might use environment variables such as `HOME`
or `XDG_CONFIG_HOME` to store configuration files, additionally some VMs
might allow wasm modules to read environment variables from the host.
Currently, if a runtime is launched using the WebAssembly platform it
doesn't inherit the environment. As a result wasm runtimes and modules
are unable to read from environment variables and might even fail to
launch (if the config file is required). This PR aims to resolve this
issue, I have tested this with the WARDuino runtime and my WIP gdbstub.
2026-04-04 21:18:09 +00:00
Jonas Devlieghere
ba3dbbfff3
[lldb] Remove Log::Error and Log::Warning (NFC) (#190440) 2026-04-04 10:41:11 -07:00
Felipe de Azevedo Piovezan
27a762c1a3
[lldb][NFC] Add helper function for computing whether to show Process error (#190189) 2026-04-04 18:39:41 +01:00
Dave Lee
a8ad2a7d73
[lldb] Fix alias parsing with joined options (#190301)
Fixes a crash with the following alias, which I use for printing the
contents of pointer variables:

```
command alias vp v -P1
```

At some point in the recent-ish past, parsing this alias has started
crashing lldb. The problem is code that assumes the option and its value
are separate. This assumption causes an index past the end of a vector.

This fix changes `FindArgumentIndexForOption`. The function now returns
a pair of indexes, the first index is the option, the second index is
the index of the value. In the case of joined options like `-P1`, the
two indexes are the same.
2026-04-04 07:38:28 -07:00
Jonas Devlieghere
46411f384d
[lldb] Update dsym-python-script.test for #190407 (#190432) 2026-04-03 16:48:04 -07:00
Jonas Devlieghere
52568a54d9
[lldb] Keep the existing behavior for untrusted dSYMs (#190407)
This patch does two thing:

- It reverts to the previous behavior of warning for untrusted dSYMs.
- It includes whether a dSYM is trusted or untrusted in the warning
output.

My reasoning is that there's no tooling for automatically signing dSYMs
and therefore we shouldn't change the behavior until this is more
common. The inclusion of whether the dSYM is signed or not is the first
step towards advertising the existence of the feature.

This now also means the release note I added in #189444 is correct
(again).
2026-04-03 22:11:35 +00:00
Jonas Devlieghere
0732841440
Revert "[lldb/test] Codesign executables built with custom Makefile rules" (#190398)
Reverts llvm/llvm-project#189902 because this seems to cause hangs.
2026-04-03 20:42:29 +00:00
Jonas Devlieghere
1bbcc5ea51
[lldb] Fix the macOS builld after address size was removed from Stream (#190399)
This fixes the macOS build after #190375.
2026-04-03 20:40:06 +00:00
Sergei Barannikov
85fb6ba2b7
[lldb][Utility] Remove address size from Stream class (NFC) (#190375)
It violates abstraction. Luckily, it was used only in two places, see
DumpDataExtractor.cpp and CommandObjectMemory.cpp.
2026-04-03 21:36:52 +03:00
Jonas Devlieghere
b8ea714224
[lldb] Fix formatting in ModuleList (NFC) (#190382)
I had auto-merge enabled in #189444 and since the formatter is
non-blocking it got merged despite the issue. Given I'm already here, I
just formatted the whole file.
2026-04-03 18:24:50 +00:00
Jonas Devlieghere
271a08889b
[lldb] Load scripts from code signed dSYM bundles (#189444)
LLDB automatically discovers, but doesn't automatically load, scripts in
the dSYM bundle. This is to prevent running untrusted code. Users can
choose to import the script manually or toggle a global setting to
override this policy. This isn't a great user experience: the former
quickly becomes tedious and the latter leads to decreased security.

This PR offers a middle ground that allows LLDB to automatically load
scripts from trusted dSYM bundles. Trusted here means that the bundle
was signed with a certificate trusted by the system. This can be a
locally created certificate (but not an ad-hoc certificate) or a
certificate from a trusted vendor.
2026-04-03 17:04:47 +00:00
Jonas Devlieghere
fd68fa98fc
[lldb] Remove unnecessary calls to ConstString::AsCString (NFC) (#190298)
Replace calls to `ConstString::AsCString` with
`ConstString::GetString(Ref)` where appropriate.

Assisted-by: Claude Code
2026-04-03 16:11:23 +00:00
Ilia Kuklin
d8d2e3358c
[lldb] Make command-dil-diagnostics.test UNSUPPORTED on Windows (#190341)
The test from #187680 passes on some Windows buildbots, but fails on
others.
2026-04-03 18:27:57 +05:00
Sergei Barannikov
f1d167123c
[lldb] Return 0 instead of false from a function returning size_t (NFC) (#190334) 2026-04-03 11:32:37 +00:00
Ilia Kuklin
e24936b7ad
[lldb] Fix DIL error diagnostics output (#187680)
* Correctly return the result when used from the console, so that
`DiagnosticsRendering` could use it to output the error.
* Add location pointer to `DILDiagnosticError` internal formatting to
show diagnostics when called from the API.
2026-04-03 16:29:33 +05:00
Michael Buch
f91124a55b
[lldb][Module] Only call LoadScriptingResourceInTarget via ModuleList (#190136)
This patch is motivated by
https://github.com/llvm/llvm-project/pull/189943, where we would like to
print the "these module scripts weren't loaded" warning for *all*
modules batched together. I.e., we want to print the warning *after* all
the script loading attempts, not from within each attempt.

To do so we want to hoist the `ReportWarning` calls in
`Module::LoadScriptingResourceInTarget` out into the callsites. But if
we do that, the callers have to remember to print the warnings. To avoid
this, we redirect all callsites to use
`ModuleList::LoadScriptingResourceInTarget`, which will be responsible
for printing the warnings.

To avoid future accidental uses of
`Module::LoadScriptingResourceInTarget` I moved the API into
`ModuleList` and made it `private`.
2026-04-03 07:03:11 +00:00
Jason Molenda
124b0a8fbb
[lldb][kernel debug] Add a missing call to scan local fs for kexts (#190281)
A kernel developer noticed that I missed a call to index the local
filesystem in one of our codepaths, and had a use case that depended on
that working.

rdar://173814556
2026-04-02 16:33:00 -07:00
Dave Lee
8fa4b3d601
[lldb] Simplify some tests to run_to_source_breakpoint (NFC) (#190082)
Many tests have ad hoc forms of the launch & break steps done by
`lldbutil.run_to_source_breakpoint`. This changes some of those tests to
use `run_to_source_breakpoint` instead.

Assisted-by: claude
2026-04-02 15:20:49 -07:00
Alex Langford
e0e439ce9f
[lldb] Remove libc++ category from TestNavigateHiddenFrame.py (#190016)
This test technically does not require libc++. The test binary mimics
libc++'s namespace layout to trigger some frame hiding logic in lldb,
but it does not require libc++ to function.
2026-04-02 11:12:47 -07:00
Alex Langford
343210656c
[lldb] Standardize TestVectorOfEnums.py as a C++ data formatter test (#189757)
This is explicitly marked as a libc++ test and functionally tests the
formatter for a vector of enums. I put it in the generic directory
because there's no reason this couldn't work for other c++ stdlibs.

Additionally, this should be using the custom libc++ like the other
tests.
2026-04-02 11:12:00 -07:00
Charles Zablit
29c083a61f
[lldb][windows] simplify the ConPTY draining subprocess (#190178)
In some environments like swiftlang, the `''` causes the command used to
drain the init sequence of the ConPTY to fail. Replacing with a `cls`
invocation removes the need for quotation marks and works just as well.
2026-04-02 15:08:52 +01:00
Charles Zablit
aff601aed8
[lldb][windows] fix duplicate OnLoadModule events (#189376) 2026-04-02 14:46:00 +01:00
David Spickett
c329cc59d9
[lldb][test][NFC] Move register command tests (#190144)
For whatever reason we ended up with register/register but the first
register just had the second register folder in it.

Move the files up one level so we have register/<test files>.
2026-04-02 11:13:44 +01:00
David Spickett
5f6835daf4
[lldb][AArch64][Linux] Qualify uses of user_sve_header (#190130)
Fixes #165413. Where a build failure was reported:
```
/b/s/w/ir/x/w/llvm-llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:1182:9: error: unknown type name 'user_sve_header'; did you mean 'sve::user_sve_header'?
 1182 |         user_sve_header *header =
      |         ^~~~~~~~~~~~~~~
      |         sve::user_sve_header
```
To fix this, add sve:: as we do for all other uses of this.

This is LLDB's copy of a structure that Linux also defines. I think the
build worked on some machines because that version ended up being
included, but with a more isolated build, it may not.

We have our own definition of it so we can be sure what we're using in
case Linux extends it later.
2026-04-02 08:29:34 +00:00
Med Ismail Bennani
478a6abc0c
[lldb/test] Codesign executables built with custom Makefile rules (#189902)
Tests with custom a.out targets in their Makefile (i.e.
`TestBSDArchives.py`) bypass the standard Makefile.rules linking step
where `CODESIGN` is applied. This leaves the binary unsigned, causing
the process to get kill it on remote darwin devices.

This adds a codesigning step to the all target in Makefile.rules that
signs both $(EXE) and a.out if they exist. This ensures all test
binaries are signed regardless of how they were built.

rdar://173840592

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2026-04-01 14:04:29 -07:00
Jonas Devlieghere
66d1dc48ad
Revert "[lldb] Increase timeout on lldbutil.wait_for_file_on_target" (#190004)
Reverts llvm/llvm-project#189471 because it seems like this breaks the
Sanitized bots:
https://github.com/llvm/llvm-project/pull/189471#issuecomment-4171688975
2026-04-01 17:27:26 +00:00
Dave Lee
015f864215
[lldb] Const some ASTContext pointers in TypeSystemClang (NFC) (#189975) 2026-04-01 09:24:55 -07:00
Charles Zablit
d95292f67b
[lldb][windows] refactor FileAction (#179274) 2026-04-01 14:47:08 +01:00
David Spickett
23d76784a5
[lldb][AArch64][Linux] Add tests for SME only support (#165414)
This PR is the tests for #138717. I have split it from implementation as
there is a lot of code, and the two don't really overlap. The tests are
checking what a user will see in LLDB, and only indirectly what happens
in lldb-server.

There are two types of tests, the first is register access tests. These
start in a given mode, where a mode is a combination of the streaming
mode on or off, ZA on or off, and a vector length.

For register access tests I have used two states:
* Streaming mode, ZA on, default vector length
* Non-streaming mode, ZA off, default vector length

(changing mode and vector length is tested in existing SVE+SME tests and
the expression tests I'm adding in this same PR)

The test program:
* Sets up the requested mode.
* Allocates a bunch of buffers for LLDB to write expected register
values to.
* Sets initial register values.

Then LLDB looks for those expected values. Assuming they are present, it
then writes a new set of values to the registers, and to the buffers
within the program. The program is then stepped, which runs an
in-process function to check that it now sees those register values. If
that function fails, we have a bug. If it does not, LLDB then checks for
the same values.

This process repeats for several registers. Hence the repeated calls to
check_register_values in the test program.

In this way we make sure that LLDB sends the correct values to ptrace by
validating them in process. Also that LLDB does not write other
registers in the process of writing one register. Which happened to me
several times during development.

The buffer writes are done with memory writes not expression evaluation
becuase at this stage we cannot trust that expressions work (the
expression tests will later prove that they do).

The second type of tests are expression state restoration tests. For
each combination of states we check that we can restore to a given state
if an expression takes us into the other state. This includes between
the same state, and adds an extra vector length to check expanding and
shrinking SVE buffers. This produces roughly 64 tests.

I have written them all as one test case in a loop because these take a
long time (~20 minutes on an FVP) and you almost always want it to fail
fast. When tracing is enabled you'll see the current states logged.

It's possible that we could skip some of these tests as being very
unlikely to ever happen, but in the spirit of
"There are Only Four Billion Floats–So Test Them All!" I think it is
simpler to enumerate every possible state change.

I have not added a test for executing an expression incompatible with
the current mode because this leads to SIGILL, which I know we already
handle. At this time LLDB makes no effort to make the expression
compatible with the current mode either.
2026-04-01 14:03:51 +01:00
David Spickett
bc36746ddf
[lldb][docs] Add documentation for AArch64 Linux SME only support (#165415)
As for other features, this is a mixture of user facing decisions and
internal design decisions.
2026-04-01 13:59:09 +01:00
David Spickett
ed48aeadf3
[lldb][AArch64][Linux] Add support for SME only systems (#165413)
This is the implementation part of #138717, tests and documentation will
be in a separate PR.

SME only systems have SME but not SVE. Previously we assumed that you
would either have SVE, SVE+SME, or neither. On an SME only system, the
SVE register state exists only in streaming mode. SVE instructions may
be used, but only in streaming mode. The Linux kernel will report that
such a processor has SME features but no SVE features.

This means that the non-streaming SVE ptrace register set is
inaccessible (with one exception mentioned below). So the main change
here is around the management of FP registers.

* In non-streaming mode, FP registers must be accessed via the FP
register set. Not the non-streaming SVE register set.
* In streaming mode, FP registers are a subset of the streaming SVE
registers, accessed via the streaming SVE register set.

The one exception the kernel allows is:
> On systems that do not support SVE it is permitted to use SETREGSET to
write SVE_PT_REGS_FPSIMD formatted data via NT_ARM_SVE, in this case the
vector length should be specified as 0. This allows streaming mode to be
disabled on systems with SME but not SVE.

https://docs.kernel.org/arch/arm64/sve.html

This is how we are able to restore to a non-streaming state when an
expression leaves us in streaming mode.

The major changes to LLDB are:
* If we receive only SVG in the expedited registers, we now assume it's
an SME only system and therefore VG == SVG.
* A new state SVEState::StreamingFPSIMD is added to mark the mode where
we are in FPSIMD mode on an SME only system (as opposed to the FPSIMD
state of an SVE or SVE+SME system).
* CalculateFprOffset now returns different results depending on whether
we have only SIMD or we have streaming SVE. In the latter case, the
stored register offsets are relative to the SVE registers, but actual
accesses need to be relative to the ptrace FP register set.
* In WriteAllRegisters, if we have an FP set to restore on an SME only
system we assume we must have been in non-streaming mode at the time of
the save. So we restore it using the previously mentioned non-streaming
SVE write.
* GetSVERegSet and ConfigureRegisterContext were updated to handle the
new StreamingFPSIMDOnly state.
2026-04-01 13:30:25 +01:00
David Spickett
2e51fdaa77
[lldb] Replace OptionalBool with LazyBool (#189652)
The only difference between them is that OptionalBool's third state
is "unknown" and LazyBool's is "calculate". We don't need to tell
the difference in a single context, so I've made a new eLazyBoolDontKnow
which is an alias of eLazyBoolCalculate.
2026-04-01 09:26:02 +01:00
Michael Buch
89dec12692
[lldb][Platform] Handle LoadScriptFromSymFile per-module FileSpec (#189696)
This patch changes the `Platform::LocateXXX` to return a map from
`FileSpec` to `LoadScriptFromSymFile` enum.

This is needed for https://github.com/llvm/llvm-project/pull/188722,
where I intend to set `LoadScriptFromSymFile` per-module.

By default the `Platform::LocateXXX` set the value to whatever the
target's current `target.load-script-from-symbol-file` is set to. In
https://github.com/llvm/llvm-project/pull/188722 we'll allow overriding
this per-target setting on a per-module basis.

Drive-by:
* Added logging when we fail to load a script.
2026-03-31 22:24:00 +00:00
cmtice
f43ee18e98
[LLDB] Add allow_var_updates to DIL and CanUpdateVar to SetValueFromInteger (#186421)
In preparation for updating DIL to handle assignments, this adds a
member variable to the DIL Interpreter indicating whether or not
updating program variables is allowed. For invocations from the LLDB
command prompt (through "frame variable") we want to allow it, but from
other places we might not. Therefore we also add new StackFrame
ExpressionPathOption, eExpressionPathOptionsAllowVarUpdates, which we
add to calls from CommandObjectFrame, and which is checked in
GetValueForVariableExpressionPath. Finally, we also add a parameter,
can_update_vars, with a default value of true, to
ValueObject::SetValueFromInteger, as that will be the main function used
to by assignment in DIL.
2026-03-31 14:13:48 -07:00
Alex Langford
626f942073
[lldb] Increase timeout on lldbutil.wait_for_file_on_target (#189471)
I've been tracking sporadic timeouts waiting for a file to appear on
macOS buildbots (and occasionally local development environments). I
believe I've tracked it down to a regression in process launch
performance in macOS.

What I noticed is that running multiple test suites simultaneously
almost always triggered these failures and that the tests were always
waiting on files created by the inferior. Increasing this timeout no
longer triggers the failures on my loaded machine locally.

This timeout moves from about 16 seconds of total wait time to about 127
seconds of total wait time. This may feel a bit extreme, but this is a
performance issue. While I was here, I cleaned up logging code I was
using to investigate the test failures.

rdar://172122213
2026-03-31 12:36:51 -07:00
Michael Buch
5c71351cf7
[lldb][Module] Add logging when script import fails (#189695)
We already log the import attempt. This patch logs the failure to load
the script since otherwise the log may be misleading. Didn't think it
was worth adding a test-case for this.
2026-03-31 17:52:13 +00:00
Dave Lee
f74f32b529
[lldb][bytecode] Remove "Generated with" comment (#189704)
In most cases, some other script/tool will call the compiler, and it's
the invocation of that script that ought to be documented in the output.
2026-03-31 16:46:09 +00:00
Dave Lee
4087c5f30d
[lldb][bytecode] Add append mode for compiler output (#189693) 2026-03-31 08:56:14 -07:00
Dave Lee
b66d98afb9
[lldb][bytecode] Improvements to compiler generated Swift (#189425)
Following feedback from @benrimmington in
https://github.com/apple/swift-collections/pull/607, this changes the
following:

1. Uses `objectFormat()` compiler conditional instead of `os()` (see
"Cross-platform object file format support" in
[SE-0492](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0492-section-control.md#cross-platform-object-file-format-support))
2. Uses a raw identifier for the generated Swift symbol name, instead of
an escaped name (see
[SE-0451](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0451-escaped-identifiers.md))
2026-03-31 08:23:30 -07:00
John Harrison
e7483770c7
[lldb-dap] Correct attaching by program basename. (#188886)
Fixes an issue where attaching by program would fail if the program name
was a partial name (e.g. "foobar" instead of "/path/to/foobar").

We failed to create the target which caused the attach to fail. Now we
fallback to the dummy target and update to the real target after the
attach completes.

Here is an example launch configuration that fail:

```
{
  "type": "lldb-dap",
  "name": "Attach (wait)",
  "request": "attach",
  "program": "foobar",
  "waitFor": true
},
```
2026-03-31 06:41:35 -07:00