<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb][Expression] Don't create Objective-C IR checker for pure-C++ targets/frames (#144503)</title>
<updated>2025-06-17T15:33:24+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-06-17T15:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ced29b8482e3537da7d27d410bf7947b0666b4c'/>
<id>4ced29b8482e3537da7d27d410bf7947b0666b4c</id>
<content type='text'>
There's no need to create this utility function (and run it) for
targets/frames that aren't Objective-C/Objective-C++.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no need to create this utility function (and run it) for
targets/frames that aren't Objective-C/Objective-C++.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][Expression] Remove IR pointer checker (#144483)</title>
<updated>2025-06-17T14:24:26+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-06-17T14:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7'/>
<id>0a7b0c844c59189ad4f5072b73d7dfdfd78e76b7</id>
<content type='text'>
Currently when jitting expressions, LLDB scans the IR instructions of
the `$__lldb_expr` and will insert a call to a utility function for each
load/store instruction. The purpose of the utility funciton is to
dereference the load/store operand. If that operand was an invalid
pointer the utility function would trap and LLDB asks the IR checker
whether it was responsible for the trap, in which case it prints out an
error message saying the expression dereferenced an invalid pointer.

This is a lot of setup for not much gain. In fact, creating/running this
utility expression shows up as ~2% of the expression evaluation time
(though we cache them for subsequent expressions). And the error message
we get out of it is arguably less useful than if we hadn't instrumented
the IR. It was also untested.

Before:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Execution was interrupted, reason: Attempted to dereference an invalid pointer..
The process has been returned to the state before expression evaluation.
```

After:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Expression execution was interrupted: EXC_BAD_ACCESS (code=1, address=0x5).
The process has been returned to the state before expression evaluation.
```

This patch removes this IR checker.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when jitting expressions, LLDB scans the IR instructions of
the `$__lldb_expr` and will insert a call to a utility function for each
load/store instruction. The purpose of the utility funciton is to
dereference the load/store operand. If that operand was an invalid
pointer the utility function would trap and LLDB asks the IR checker
whether it was responsible for the trap, in which case it prints out an
error message saying the expression dereferenced an invalid pointer.

This is a lot of setup for not much gain. In fact, creating/running this
utility expression shows up as ~2% of the expression evaluation time
(though we cache them for subsequent expressions). And the error message
we get out of it is arguably less useful than if we hadn't instrumented
the IR. It was also untested.

Before:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Execution was interrupted, reason: Attempted to dereference an invalid pointer..
The process has been returned to the state before expression evaluation.
```

After:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Expression execution was interrupted: EXC_BAD_ACCESS (code=1, address=0x5).
The process has been returned to the state before expression evaluation.
```

This patch removes this IR checker.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Prefer PointerType::get with LLVMContext over Type (NFC) (#133869)</title>
<updated>2025-04-01T23:27:29+00:00</updated>
<author>
<name>Mats Jun Larsen</name>
<email>mats@jun.codes</email>
</author>
<published>2025-04-01T23:27:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d53555499f85b7aedb765c66d6f3850c7bc6126d'/>
<id>d53555499f85b7aedb765c66d6f3850c7bc6126d</id>
<content type='text'>
Part of #123569</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of #123569</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use BasicBlock::iterator instead of InsertPosition (NFC) (#112307)</title>
<updated>2024-10-15T15:25:28+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-10-15T15:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=74eb079e06ae052feda28e63f4f63303efc01236'/>
<id>74eb079e06ae052feda28e63f4f63303efc01236</id>
<content type='text'>
InsertPosition has been deprecated in favor of using
BasicBlock::iterator. (See #102608)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
InsertPosition has been deprecated in favor of using
BasicBlock::iterator. (See #102608)</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Nits on uses of llvm::raw_string_ostream (NFC) (#108745)</title>
<updated>2024-09-16T04:26:51+00:00</updated>
<author>
<name>Youngsuk Kim</name>
<email>joseph942010@gmail.com</email>
</author>
<published>2024-09-16T04:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d7796855b87911b8ae6c726ab5df4949f173dbd2'/>
<id>d7796855b87911b8ae6c726ab5df4949f173dbd2</id>
<content type='text'>
As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly

( 65b13610a5226b84889b923bae884ba395ad084d for further reference )

* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess
indirection.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly

( 65b13610a5226b84889b923bae884ba395ad084d for further reference )

* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess
indirection.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Avoid calling DataLayout constructor accepting Module pointer (NFC) (#102839)</title>
<updated>2024-08-12T18:46:47+00:00</updated>
<author>
<name>Sergei Barannikov</name>
<email>barannikov88@gmail.com</email>
</author>
<published>2024-08-12T18:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e26b42c70d37cbea47016984e1d2bfc347fb8818'/>
<id>e26b42c70d37cbea47016984e1d2bfc347fb8818</id>
<content type='text'>
The constructor initializes `*this` with a copy of `M-&gt;getDataLayout()`,
which can just be spelled as `DataLayout DL = M-&gt;getDataLayout()`. In
all places where the constructor is used, Module outlives DataLayout, so
store a reference to it instead of cloning.

Pull Request: https://github.com/llvm/llvm-project/pull/102839
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The constructor initializes `*this` with a copy of `M-&gt;getDataLayout()`,
which can just be spelled as `DataLayout DL = M-&gt;getDataLayout()`. In
all places where the constructor is used, Module outlives DataLayout, so
store a reference to it instead of cloning.

Pull Request: https://github.com/llvm/llvm-project/pull/102839
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix calls to Type::getInt8PtrTy (#71561)</title>
<updated>2023-11-07T17:49:11+00:00</updated>
<author>
<name>Paulo Matos</name>
<email>pmatos@igalia.com</email>
</author>
<published>2023-11-07T17:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3267cd3fa10651b46e9d1ce66940301e784c0533'/>
<id>3267cd3fa10651b46e9d1ce66940301e784c0533</id>
<content type='text'>
These have been removed in 7b9d73c2f90c0ed8497339a16fc39785349d9610.
This is a followup patch to apply the changes to lldb.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These have been removed in 7b9d73c2f90c0ed8497339a16fc39785349d9610.
This is a followup patch to apply the changes to lldb.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][expr] Propagate ClangDynamicCheckerFunctions::Install() errors to caller</title>
<updated>2023-03-21T18:05:23+00:00</updated>
<author>
<name>Stefan Gränitz</name>
<email>stefan.graenitz@gmail.com</email>
</author>
<published>2023-03-21T18:01:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32baf5c1c29b6b2f282354c9f5919865bc1ff958'/>
<id>32baf5c1c29b6b2f282354c9f5919865bc1ff958</id>
<content type='text'>
I came accross this, because a lot of regression tests were saying:
```
(lldb) p argc
error: expression failed to parse:
error: couldn't install checkers, unknown error
```

With this change, error messages provide more detail:
```
(lldb) p argc
error: expression failed to parse:
error: couldn't install checkers:
error: Couldn't lookup symbols:
  __objc_load
```

I didn't find a case where `Diagnostics()` is not empty. Also it looks like this isn't covered in any test (yet).

Reviewed By: bulbazord, Michael137

Differential Revision: https://reviews.llvm.org/D146541
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I came accross this, because a lot of regression tests were saying:
```
(lldb) p argc
error: expression failed to parse:
error: couldn't install checkers, unknown error
```

With this change, error messages provide more detail:
```
(lldb) p argc
error: expression failed to parse:
error: couldn't install checkers:
error: Couldn't lookup symbols:
  __objc_load
```

I didn't find a case where `Diagnostics()` is not empty. Also it looks like this isn't covered in any test (yet).

Reviewed By: bulbazord, Michael137

Differential Revision: https://reviews.llvm.org/D146541
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Remove some typed pointer code (NFCI)</title>
<updated>2023-03-17T14:25:58+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2023-03-17T14:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=49f9af1864d918a0561e455d2ec403f32135c108'/>
<id>49f9af1864d918a0561e455d2ec403f32135c108</id>
<content type='text'>
Various bitcast handling should no longer be necessary with
opaque pointers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Various bitcast handling should no longer be necessary with
opaque pointers.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB</title>
<updated>2022-03-14T20:32:03+00:00</updated>
<author>
<name>Shafik Yaghmour</name>
<email>syaghmour@apple.com</email>
</author>
<published>2022-03-14T20:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28c878aeb29a7e7a9ae8f748de6a3c41482b97be'/>
<id>28c878aeb29a7e7a9ae8f748de6a3c41482b97be</id>
<content type='text'>
Applied modernize-use-default-member-init clang-tidy check over LLDB.
It appears in many files we had already switched to in class member init but
never updated the constructors to reflect that. This check is already present in
the lldb/.clang-tidy config.

Differential Revision: https://reviews.llvm.org/D121481
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Applied modernize-use-default-member-init clang-tidy check over LLDB.
It appears in many files we had already switched to in class member init but
never updated the constructors to reflect that. This check is already present in
the lldb/.clang-tidy config.

Differential Revision: https://reviews.llvm.org/D121481
</pre>
</div>
</content>
</entry>
</feed>
