<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Core/SourceManager.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] Eliminate SupportFileSP nullptr derefs (#168624)</title>
<updated>2025-11-21T00:45:11+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-11-21T00:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=06eac9feb92cba1d24e8a674c643aae1200d2bc8'/>
<id>06eac9feb92cba1d24e8a674c643aae1200d2bc8</id>
<content type='text'>
This patch fixes and eliminates the possibility of SupportFileSP ever
being nullptr. The support file was originally treated like a value
type, but became a polymorphic type and therefore has to be stored and
passed around as a pointer.

To avoid having all the callers check the validity of the pointer, I
introduced the invariant that SupportFileSP is never null and always
default constructed. However, without enforcement at the type level,
that's fragile and indeed, we already identified two crashes where
someone accidentally broke that invariant.

This PR introduces a NonNullSharedPtr to prevent that. NonNullSharedPtr
is a smart pointer wrapper around std::shared_ptr that guarantees the
pointer is never null. If default-constructed, it creates a
default-constructed instance of the contained type. Note that I'm using
private inheritance because you shouldn't inherit from standard library
classes due to the lack of virtual destructor. So while the new
abstraction looks like a `std::shared_ptr`, it is in fact **not** a
shared pointer. Given that our destructor is trivial, we could use
public inheritance, but currently there's no need for it.

rdar://164989579</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes and eliminates the possibility of SupportFileSP ever
being nullptr. The support file was originally treated like a value
type, but became a polymorphic type and therefore has to be stored and
passed around as a pointer.

To avoid having all the callers check the validity of the pointer, I
introduced the invariant that SupportFileSP is never null and always
default constructed. However, without enforcement at the type level,
that's fragile and indeed, we already identified two crashes where
someone accidentally broke that invariant.

This PR introduces a NonNullSharedPtr to prevent that. NonNullSharedPtr
is a smart pointer wrapper around std::shared_ptr that guarantees the
pointer is never null. If default-constructed, it creates a
default-constructed instance of the contained type. Note that I'm using
private inheritance because you shouldn't inherit from standard library
classes due to the lack of virtual destructor. So while the new
abstraction looks like a `std::shared_ptr`, it is in fact **not** a
shared pointer. Given that our destructor is trivial, we could use
public inheritance, but currently there's no need for it.

rdar://164989579</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Emit a progress event from the source manager (#165802)</title>
<updated>2025-10-31T20:10:09+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-10-31T20:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22d2f7f38e65f8696c38a60d490f56b5d75b824f'/>
<id>22d2f7f38e65f8696c38a60d490f56b5d75b824f</id>
<content type='text'>
Reading a source file might take a while, for example because it's
located on a virtual file system that's fetching the data on demand.

This PR emits a progress event to convey this to the user when reading
the file exceeds a certain threshold (500ms). Although it doesn't speed
up the operation, it still greatly improves the user experience by
helping them understand what's going on.

rdar://163750392</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reading a source file might take a while, for example because it's
located on a virtual file system that's fetching the data on demand.

This PR emits a progress event to convey this to the user when reading
the file exceeds a certain threshold (500ms). Although it doesn't speed
up the operation, it still greatly improves the user experience by
helping them understand what's going on.

rdar://163750392</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] print a notice when `source list` paging reaches the end of th… (#137515)</title>
<updated>2025-05-08T14:01:16+00:00</updated>
<author>
<name>Zax</name>
<email>44502668+hapeeeeee@users.noreply.github.com</email>
</author>
<published>2025-05-08T14:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b5674cb7be1b010be181883601a3674ceef38683'/>
<id>b5674cb7be1b010be181883601a3674ceef38683</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] s/GetAddressRange().GetBaseAddress()/GetAddress() (#125847)</title>
<updated>2025-02-06T08:17:50+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-02-06T08:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0cfb98f871b6bc82691b5aa85b20703de1621875'/>
<id>0cfb98f871b6bc82691b5aa85b20703de1621875</id>
<content type='text'>
Three more cases where it's obvious that the code is looking for the
address of the function entry point.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Three more cases where it's obvious that the code is looking for the
address of the function entry point.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Search main function with lldb::eFunctionNameTypeFull when getting default file and line. (#113980)</title>
<updated>2024-10-29T20:23:33+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2024-10-29T20:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8193832fb988e3df1e8e726634783805dca8d9b6'/>
<id>8193832fb988e3df1e8e726634783805dca8d9b6</id>
<content type='text'>
This is to work around the fact that
`SymbolFileNativePDB::FindFunctions` only support
`lldb::eFunctionNameTypeFull` and `lldb::eFunctionNameTypeMethod` now.
Since `main`'s full name is the same as base name (`main`), it's okay to
search with `lldb::eFunctionNameTypeFull` when trying to get the default
file and line. With this, `lldb/test/Shell/Driver/TestSingleQuote.test`
passes on Windows with NativePDB plugin.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to work around the fact that
`SymbolFileNativePDB::FindFunctions` only support
`lldb::eFunctionNameTypeFull` and `lldb::eFunctionNameTypeMethod` now.
Since `main`'s full name is the same as base name (`main`), it's okay to
search with `lldb::eFunctionNameTypeFull` when trying to get the default
file and line. With this, `lldb/test/Shell/Driver/TestSingleQuote.test`
passes on Windows with NativePDB plugin.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Print a warning on checksum mismatch (#107968)</title>
<updated>2024-09-11T15:53:07+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-09-11T15:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ffa2f539ae2a4e79c01b3d54f8b12c63d8781a0c'/>
<id>ffa2f539ae2a4e79c01b3d54f8b12c63d8781a0c</id>
<content type='text'>
Print a warning when the debugger detects a mismatch between the MD5
checksum in the DWARF 5 line table and the file on disk. The warning is
printed only once per file.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Print a warning when the debugger detects a mismatch between the MD5
checksum in the DWARF 5 line table and the file on disk. The warning is
printed only once per file.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Avoid FileSpec indirection where we can use SupportFiles directly</title>
<updated>2024-09-03T21:38:39+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-09-03T17:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98bde7fd872c10e49035d5dc5d2f2b44489f6a07'/>
<id>98bde7fd872c10e49035d5dc5d2f2b44489f6a07</id>
<content type='text'>
Now that more parts of LLDB know about SupportFiles, avoid going through
FileSpec (and losing the Checksum in the process). Instead, use the
SupportFile directly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that more parts of LLDB know about SupportFiles, avoid going through
FileSpec (and losing the Checksum in the process). Instead, use the
SupportFile directly.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Include checksum in source cache dump (#106773)</title>
<updated>2024-08-30T20:16:26+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-08-30T20:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5e7f0dcd69fd666bbb2a93d20e6a56a11261b519'/>
<id>5e7f0dcd69fd666bbb2a93d20e6a56a11261b519</id>
<content type='text'>
This patch updates the source cache dump command to print both the
actual (on-disk) checksum and the expected (line table) checksum. To
achieve that we now read and store the on-disk checksum in the cached
object. The same information will be used in a future path to print a
warning when the checksums differ.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates the source cache dump command to print both the
actual (on-disk) checksum and the expected (line table) checksum. To
achieve that we now read and store the on-disk checksum in the cached
object. The same information will be used in a future path to print a
warning when the checksums differ.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Deal with SupportFiles in SourceManager (NFC) (#106740)</title>
<updated>2024-08-30T17:58:32+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-08-30T17:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=130eddf7a13f15c9c48b7fa7faf60e9bbee4f703'/>
<id>130eddf7a13f15c9c48b7fa7faf60e9bbee4f703</id>
<content type='text'>
To support detecting MD5 checksum mismatches, deal with SupportFiles
rather than a plain FileSpecs in the SourceManager.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To support detecting MD5 checksum mismatches, deal with SupportFiles
rather than a plain FileSpecs in the SourceManager.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Store SupportFiles in SourceManager::File (NFC) (#106639)</title>
<updated>2024-08-30T14:18:55+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-08-30T14:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab40ae8ff9f87b6e3d68cab2c47d692016ede958'/>
<id>ab40ae8ff9f87b6e3d68cab2c47d692016ede958</id>
<content type='text'>
To support detecting MD5 checksum mismatches, store a SupportFile rather
than a plain FileSpec in SourceManager::File.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To support detecting MD5 checksum mismatches, store a SupportFile rather
than a plain FileSpec in SourceManager::File.</pre>
</div>
</content>
</entry>
</feed>
