<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.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>[NFC][Support] Add llvm::uninitialized_copy (#138174)</title>
<updated>2025-05-08T00:37:38+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-08T00:37:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7245e21e896a39fbbbbe38e800791411ebde4011'/>
<id>7245e21e896a39fbbbbe38e800791411ebde4011</id>
<content type='text'>
Add `llvm::uninitialized_copy` that accepts a range instead of start/end
iterator for the source of the copy.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `llvm::uninitialized_copy` that accepts a range instead of start/end
iterator for the source of the copy.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reland "Symbolize line zero as if no source info is available (#124846)" (#133798)"</title>
<updated>2025-04-10T01:09:31+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-04-10T01:02:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78b21ddba7bc43b1e59d97ccad51133858a9ce91'/>
<id>78b21ddba7bc43b1e59d97ccad51133858a9ce91</id>
<content type='text'>
This reverts commit 348374028970c956f2e49ab7553b495d7408ccd9 because #128619 doesn't handle the case when we have an empty frame from `getInliningInfoForAddress` because line num is 0 which makes it non-differentiable from missing debug info. So, we end up using the base filename from symtab again. Reverting for now until that issus is solved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 348374028970c956f2e49ab7553b495d7408ccd9 because #128619 doesn't handle the case when we have an empty frame from `getInliningInfoForAddress` because line num is 0 which makes it non-differentiable from missing debug info. So, we end up using the base filename from symtab again. Reverting for now until that issus is solved.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "Symbolize line zero as if no source info is available (#124846)" (#133798)</title>
<updated>2025-03-31T23:13:46+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-03-31T23:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=348374028970c956f2e49ab7553b495d7408ccd9'/>
<id>348374028970c956f2e49ab7553b495d7408ccd9</id>
<content type='text'>
This land commits 23aca2f88dd5d2447e69496c89c3ed42a56f9c31 and
1b15a89a23c631a8e2d096dad4afe456970572c0.
https://github.com/llvm/llvm-project/pull/128619 makes symbolizer to
always use debug info when available so we can reland this chagnge.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This land commits 23aca2f88dd5d2447e69496c89c3ed42a56f9c31 and
1b15a89a23c631a8e2d096dad4afe456970572c0.
https://github.com/llvm/llvm-project/pull/128619 makes symbolizer to
always use debug info when available so we can reland this chagnge.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Symbolize line zero as if no source info is available (#124846)"</title>
<updated>2025-02-24T21:00:33+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-02-24T20:53:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=23aca2f88dd5d2447e69496c89c3ed42a56f9c31'/>
<id>23aca2f88dd5d2447e69496c89c3ed42a56f9c31</id>
<content type='text'>
This commit creates an inconsistency on `__sanitizer_symbolize_pc` API. Before this change, this API always uses the filename from debug info when the line number is 0. After this change, the filename becomes invalid when line number is 0. The sanitizer might fall back to use base filename from symbol table. So, this API may return either `??:0` or `{filename from symbol table}:0` depending on if the symbol table has the filename for it. Make sure this inconsistency is resolved before relanding the commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit creates an inconsistency on `__sanitizer_symbolize_pc` API. Before this change, this API always uses the filename from debug info when the line number is 0. After this change, the filename becomes invalid when line number is 0. The sanitizer might fall back to use base filename from symbol table. So, this API may return either `??:0` or `{filename from symbol table}:0` depending on if the symbol table has the filename for it. Make sure this inconsistency is resolved before relanding the commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a stable sort to handle overlapping/duplicate line sequences</title>
<updated>2025-02-07T23:50:41+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2025-02-07T23:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=343bbda140d5a15cd7d7fbfc6041a7506da5cdae'/>
<id>343bbda140d5a15cd7d7fbfc6041a7506da5cdae</id>
<content type='text'>
This can occur due to linker ICF and stable sort will ensure the results
are stable.

No explicit/new test coverage, because nondeterminism is non-testable.

It should already be covered by the DWARFDebugLineTest that was failing
some internal testing on an ARM machine which might've been what changed
the sort order. But `llvm::sort` also deliberately randomizes the
contents (under EXPENSIVE_CHECKS) so I'd have expected failures to show
up in any EXPENSIVE_CHECKS Build...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can occur due to linker ICF and stable sort will ensure the results
are stable.

No explicit/new test coverage, because nondeterminism is non-testable.

It should already be covered by the DWARFDebugLineTest that was failing
some internal testing on an ARM machine which might've been what changed
the sort order. But `llvm::sort` also deliberately randomizes the
contents (under EXPENSIVE_CHECKS) so I'd have expected failures to show
up in any EXPENSIVE_CHECKS Build...
</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo][DWARF] Utilize DW_AT_LLVM_stmt_sequence attr in line table lookups (#123391)</title>
<updated>2025-02-06T23:41:29+00:00</updated>
<author>
<name>alx32</name>
<email>103613512+alx32@users.noreply.github.com</email>
</author>
<published>2025-02-06T23:41:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=464f65adacd812aead775308ab7f1952fee774db'/>
<id>464f65adacd812aead775308ab7f1952fee774db</id>
<content type='text'>
**Summary**
Add support for filtering line table entries based on
`DW_AT_LLVM_stmt_sequence` attribute when looking up address ranges.
This ensures that line entries are correctly attributed to their
corresponding functions, even when multiple functions share the same
address range due to optimizations.

**Background**
In https://github.com/llvm/llvm-project/pull/110192 we added support to
clang to generate the `DW_AT_LLVM_stmt_sequence` attribute for
`DW_TAG_subprogram`'s. Corresponding RFC: [New DWARF Attribute for
Symbolication of Merged
Functions](https://discourse.llvm.org/t/rfc-new-dwarf-attribute-for-symbolication-of-merged-functions/79434)

The `DW_AT_LLVM_stmt_sequence` attribute allows accurate attribution of
line number information to their corresponding functions, even in
scenarios where functions are merged or share the same address space due
to optimizations like Identical Code Folding (ICF) in the linker.

**Implementation Details**
The patch modifies `DWARFDebugLine::lookupAddressRange` to accept an
optional DWARFDie parameter. When provided, the function checks if the
`DIE` has a `DW_AT_LLVM_stmt_sequence` attribute. This attribute
contains an offset into the line table that marks where the line entries
for this DIE's function begin.

If the attribute is present, the function filters the results to only
include line entries from the sequence that starts at the specified
offset. This ensures that even when multiple functions share the same
address range, we return only the line entries that actually belong to
the function represented by the DIE.

The implementation:
- Adds an optional DWARFDie parameter to lookupAddressRange
- Extracts the `DW_AT_LLVM_stmt_sequence` offset if present
- Modifies the address range lookup logic to filter sequences based on
their offset
- Returns only line entries from the matching sequence</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Summary**
Add support for filtering line table entries based on
`DW_AT_LLVM_stmt_sequence` attribute when looking up address ranges.
This ensures that line entries are correctly attributed to their
corresponding functions, even when multiple functions share the same
address range due to optimizations.

**Background**
In https://github.com/llvm/llvm-project/pull/110192 we added support to
clang to generate the `DW_AT_LLVM_stmt_sequence` attribute for
`DW_TAG_subprogram`'s. Corresponding RFC: [New DWARF Attribute for
Symbolication of Merged
Functions](https://discourse.llvm.org/t/rfc-new-dwarf-attribute-for-symbolication-of-merged-functions/79434)

The `DW_AT_LLVM_stmt_sequence` attribute allows accurate attribution of
line number information to their corresponding functions, even in
scenarios where functions are merged or share the same address space due
to optimizations like Identical Code Folding (ICF) in the linker.

**Implementation Details**
The patch modifies `DWARFDebugLine::lookupAddressRange` to accept an
optional DWARFDie parameter. When provided, the function checks if the
`DIE` has a `DW_AT_LLVM_stmt_sequence` attribute. This attribute
contains an offset into the line table that marks where the line entries
for this DIE's function begin.

If the attribute is present, the function filters the results to only
include line entries from the sequence that starts at the specified
offset. This ensures that even when multiple functions share the same
address range, we return only the line entries that actually belong to
the function represented by the DIE.

The implementation:
- Adds an optional DWARFDie parameter to lookupAddressRange
- Extracts the `DW_AT_LLVM_stmt_sequence` offset if present
- Modifies the address range lookup logic to filter sequences based on
their offset
- Returns only line entries from the matching sequence</pre>
</div>
</content>
</entry>
<entry>
<title>Symbolize line zero as if no source info is available (#124846)</title>
<updated>2025-02-06T18:45:43+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2025-02-06T18:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c32cd5746b1335ed172d1bf58fb6498b479bd8e0'/>
<id>c32cd5746b1335ed172d1bf58fb6498b479bd8e0</id>
<content type='text'>
Since line zero means "no line information", when symbolizing a location
(an address or an inline frame associated with the address) that has a
line zero location, we shouldn't include other irrelevant data (like
filename) in the result.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since line zero means "no line information", when symbolizing a location
(an address or an inline frame associated with the address) that has a
line zero location, we shouldn't include other irrelevant data (like
filename) in the result.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix gcc Wparentheses warning. NFC.</title>
<updated>2024-08-07T15:28:06+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2024-08-07T12:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4859c46761f2278e9c4c45596a32bcec8109a3e7'/>
<id>4859c46761f2278e9c4c45596a32bcec8109a3e7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Symbolizer] Support for Missing Line Numbers. (#82240)</title>
<updated>2024-08-05T08:08:34+00:00</updated>
<author>
<name>Amit Kumar Pandey</name>
<email>137622562+ampandey-1995@users.noreply.github.com</email>
</author>
<published>2024-08-05T08:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0886440ef0ed0ad553522b731c841b81dc36944c'/>
<id>0886440ef0ed0ad553522b731c841b81dc36944c</id>
<content type='text'>
LLVM Symbolizer attempt to symbolize addresses of optimized binaries
reports missing line numbers for some cases. It maybe due to compiler
which sometimes cannot map an instruction to line number due to
optimizations. Symbolizer should handle those cases gracefully.

Adding an option '--skip-line-zero' to symbolizer so as to report the
nearest non-zero line number.

---------

Co-authored-by: Amit Pandey &lt;amit.pandey@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM Symbolizer attempt to symbolize addresses of optimized binaries
reports missing line numbers for some cases. It maybe due to compiler
which sometimes cannot map an instruction to line number due to
optimizations. Symbolizer should handle those cases gracefully.

Adding an option '--skip-line-zero' to symbolizer so as to report the
nearest non-zero line number.

---------

Co-authored-by: Amit Pandey &lt;amit.pandey@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][llvm] Return an error instead of crashing when parsing a line table prologue. (#80769)</title>
<updated>2024-02-22T18:25:05+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@fb.com</email>
</author>
<published>2024-02-22T18:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a23d4ceb8866df91334750627827a1724363e755'/>
<id>a23d4ceb8866df91334750627827a1724363e755</id>
<content type='text'>
We recently ran into some bad DWARF where the `DW_AT_stmt_list` of many
compile units was randomly set to invalid values and was causing LLDB to
crash due to an assertion about address sizes not matching. Instead of
asserting, we should return an appropriate recoverable `llvm::Error`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We recently ran into some bad DWARF where the `DW_AT_stmt_list` of many
compile units was randomly set to invalid values and was causing LLDB to
crash due to an assertion about address sizes not matching. Instead of
asserting, we should return an appropriate recoverable `llvm::Error`.</pre>
</div>
</content>
</entry>
</feed>
