<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/functionalities/limit-debug-info, 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] Support tests with nested make invocations on Windows 2/2 (#112360)</title>
<updated>2024-10-16T11:07:02+00:00</updated>
<author>
<name>Stefan Gränitz</name>
<email>stefan.graenitz@gmail.com</email>
</author>
<published>2024-10-16T11:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3ef630ac339f31686290f9460a40eb2a9c9f5bd0'/>
<id>3ef630ac339f31686290f9460a40eb2a9c9f5bd0</id>
<content type='text'>
Following up from https://github.com/llvm/llvm-project/pull/112342, we
roll out the fix and quote nested `make` invocations in all API tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following up from https://github.com/llvm/llvm-project/pull/112342, we
roll out the fix and quote nested `make` invocations in all API tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Replace assertEquals with assertEqual (NFC) (#82073)</title>
<updated>2024-02-17T04:58:50+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-17T04:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80fcecb13c388ff087a27a4b0e7ca3dd8c98eaa4'/>
<id>80fcecb13c388ff087a27a4b0e7ca3dd8c98eaa4</id>
<content type='text'>
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][Py Reformat] Reformat python files in lldb</title>
<updated>2023-05-25T19:54:09+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-25T15:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2238dcc39358353cac21df75c3c3286ab20b8f53'/>
<id>2238dcc39358353cac21df75c3c3286ab20b8f53</id>
<content type='text'>
This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problems merging this commit because you have made
changes to a python file, the best way to handle that is to run `git
checkout --ours &lt;yourfile&gt;` and then reformat it with black.

RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential revision: https://reviews.llvm.org/D151460
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problems merging this commit because you have made
changes to a python file, the best way to handle that is to run `git
checkout --ours &lt;yourfile&gt;` and then reformat it with black.

RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential revision: https://reviews.llvm.org/D151460
</pre>
</div>
</content>
</entry>
<entry>
<title>Report which modules have forcefully completed types in statistics.</title>
<updated>2022-12-01T05:22:27+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@fb.com</email>
</author>
<published>2022-11-24T04:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93'/>
<id>fc743f034a34d3fa0a6e4de3b34216e5ac5e4c93</id>
<content type='text'>
A previous patch added the ability for us to tell if types were forcefully completed. This patch adds the ability to see which modules have forcefully completed types and aggregates the number of modules with forcefully completed types at the root level.

We add a module specific setting named "debugInfoHadIncompleteTypes" that is a boolean value. We also aggregate the number of modules at the root level that had incomplete debug info with a key named "totalModuleCountWithIncompleteTypes" that is a count of number of modules that had incomplete types.

Differential Revision: https://reviews.llvm.org/D138638
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A previous patch added the ability for us to tell if types were forcefully completed. This patch adds the ability to see which modules have forcefully completed types and aggregates the number of modules with forcefully completed types at the root level.

We add a module specific setting named "debugInfoHadIncompleteTypes" that is a boolean value. We also aggregate the number of modules at the root level that had incomplete debug info with a key named "totalModuleCountWithIncompleteTypes" that is a count of number of modules that had incomplete types.

Differential Revision: https://reviews.llvm.org/D138638
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the ability to see when a type in incomplete.</title>
<updated>2022-11-23T18:07:12+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@fb.com</email>
</author>
<published>2022-10-10T23:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d941fceca8e9bc9b5a00c9865ee022ba5507df32'/>
<id>d941fceca8e9bc9b5a00c9865ee022ba5507df32</id>
<content type='text'>
-flimit-debug-info and other compiler options might end up removing debug info that is needed for debugging. LLDB marks these types as being forcefully completed in the metadata in the TypeSystem. These types should have been complete in the debug info but were not because the compiler omitted them to save space. When we can't find a suitable replacement for the type, we should let the user know that these types are incomplete to indicate there was an issue instead of just showing nothing for a type.

The solution is to display presented in this patch is to display "&lt;incomplete type&gt;" as the summary for any incomplete types. If there is a summary string or function that is provided for a type, but the type is currently forcefully completed, the installed summary will be ignored and we will display "&lt;incomplete type&gt;". This patch also exposes the ability to ask a SBType if it was forcefully completed with:

  bool SBType::IsTypeForcefullyCompleted();

This will allow the user interface for a debugger to also detect this issue and possibly mark the variable display up on some way to indicate to the user the type is incomplete.

To show how this is diplayed, we can look at the existing output first for the example source file from the file: lldb/test/API/functionalities/limit-debug-info/main.cpp

(lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = (member = 47)
(InheritsFromTwo) ::inherits_from_two = (member = 47)
(OneAsMember) ::one_as_member = (one = member::One @ 0x0000000100008028, member = 47)
(TwoAsMember) ::two_as_member = (two = member::Two @ 0x0000000100008040, member = 47)
(array::One [3]) ::array_of_one = ([0] = array::One @ 0x0000000100008068, [1] = array::One @ 0x0000000100008069, [2] = array::One @ 0x000000010000806a)
(array::Two [3]) ::array_of_two = ([0] = array::Two @ 0x0000000100008098, [1] = array::Two @ 0x0000000100008099, [2] = array::Two @ 0x000000010000809a)
(ShadowedOne) ::shadowed_one = (member = 47)
(lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = {
  (int) member = 47
}
(InheritsFromTwo) ::inherits_from_two = {
  (int) member = 47
}
(OneAsMember) ::one_as_member = {
  (member::One) one = {}
  (int) member = 47
}
(TwoAsMember) ::two_as_member = {
  (member::Two) two = {}
  (int) member = 47
}
(array::One [3]) ::array_of_one = {
  (array::One) [0] = {}
  (array::One) [1] = {}
  (array::One) [2] = {}
}
(array::Two [3]) ::array_of_two = {
  (array::Two) [0] = {}
  (array::Two) [1] = {}
  (array::Two) [2] = {}
}
(ShadowedOne) ::shadowed_one = {
  (int) member = 47
}

With this patch in place we can now see any classes that were forcefully completed to let us know that we are missing information:

(lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = (One = &lt;incomplete type&gt;, member = 47)
(InheritsFromTwo) ::inherits_from_two = (Two = &lt;incomplete type&gt;, member = 47)
(OneAsMember) ::one_as_member = (one = &lt;incomplete type&gt;, member = 47)
(TwoAsMember) ::two_as_member = (two = &lt;incomplete type&gt;, member = 47)
(array::One[3]) ::array_of_one = ([0] = &lt;incomplete type&gt;, [1] = &lt;incomplete type&gt;, [2] = &lt;incomplete type&gt;)
(array::Two[3]) ::array_of_two = ([0] = &lt;incomplete type&gt;, [1] = &lt;incomplete type&gt;, [2] = &lt;incomplete type&gt;)
(ShadowedOne) ::shadowed_one = (func_shadow::One = &lt;incomplete type&gt;, member = 47)
(lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = {
  (One) One = &lt;incomplete type&gt; {}
  (int) member = 47
}
(InheritsFromTwo) ::inherits_from_two = {
  (Two) Two = &lt;incomplete type&gt; {}
  (int) member = 47
}
(OneAsMember) ::one_as_member = {
  (member::One) one = &lt;incomplete type&gt; {}
  (int) member = 47
}
(TwoAsMember) ::two_as_member = {
  (member::Two) two = &lt;incomplete type&gt; {}
  (int) member = 47
}
(array::One[3]) ::array_of_one = {
  (array::One) [0] = &lt;incomplete type&gt; {}
  (array::One) [1] = &lt;incomplete type&gt; {}
  (array::One) [2] = &lt;incomplete type&gt; {}
}
(array::Two[3]) ::array_of_two = {
  (array::Two) [0] = &lt;incomplete type&gt; {}
  (array::Two) [1] = &lt;incomplete type&gt; {}
  (array::Two) [2] = &lt;incomplete type&gt; {}
}
(ShadowedOne) ::shadowed_one = {
  (func_shadow::One) func_shadow::One = &lt;incomplete type&gt; {}
  (int) member = 47
}

Differential Revision: https://reviews.llvm.org/D138259
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-flimit-debug-info and other compiler options might end up removing debug info that is needed for debugging. LLDB marks these types as being forcefully completed in the metadata in the TypeSystem. These types should have been complete in the debug info but were not because the compiler omitted them to save space. When we can't find a suitable replacement for the type, we should let the user know that these types are incomplete to indicate there was an issue instead of just showing nothing for a type.

The solution is to display presented in this patch is to display "&lt;incomplete type&gt;" as the summary for any incomplete types. If there is a summary string or function that is provided for a type, but the type is currently forcefully completed, the installed summary will be ignored and we will display "&lt;incomplete type&gt;". This patch also exposes the ability to ask a SBType if it was forcefully completed with:

  bool SBType::IsTypeForcefullyCompleted();

This will allow the user interface for a debugger to also detect this issue and possibly mark the variable display up on some way to indicate to the user the type is incomplete.

To show how this is diplayed, we can look at the existing output first for the example source file from the file: lldb/test/API/functionalities/limit-debug-info/main.cpp

(lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = (member = 47)
(InheritsFromTwo) ::inherits_from_two = (member = 47)
(OneAsMember) ::one_as_member = (one = member::One @ 0x0000000100008028, member = 47)
(TwoAsMember) ::two_as_member = (two = member::Two @ 0x0000000100008040, member = 47)
(array::One [3]) ::array_of_one = ([0] = array::One @ 0x0000000100008068, [1] = array::One @ 0x0000000100008069, [2] = array::One @ 0x000000010000806a)
(array::Two [3]) ::array_of_two = ([0] = array::Two @ 0x0000000100008098, [1] = array::Two @ 0x0000000100008099, [2] = array::Two @ 0x000000010000809a)
(ShadowedOne) ::shadowed_one = (member = 47)
(lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = {
  (int) member = 47
}
(InheritsFromTwo) ::inherits_from_two = {
  (int) member = 47
}
(OneAsMember) ::one_as_member = {
  (member::One) one = {}
  (int) member = 47
}
(TwoAsMember) ::two_as_member = {
  (member::Two) two = {}
  (int) member = 47
}
(array::One [3]) ::array_of_one = {
  (array::One) [0] = {}
  (array::One) [1] = {}
  (array::One) [2] = {}
}
(array::Two [3]) ::array_of_two = {
  (array::Two) [0] = {}
  (array::Two) [1] = {}
  (array::Two) [2] = {}
}
(ShadowedOne) ::shadowed_one = {
  (int) member = 47
}

With this patch in place we can now see any classes that were forcefully completed to let us know that we are missing information:

(lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = (One = &lt;incomplete type&gt;, member = 47)
(InheritsFromTwo) ::inherits_from_two = (Two = &lt;incomplete type&gt;, member = 47)
(OneAsMember) ::one_as_member = (one = &lt;incomplete type&gt;, member = 47)
(TwoAsMember) ::two_as_member = (two = &lt;incomplete type&gt;, member = 47)
(array::One[3]) ::array_of_one = ([0] = &lt;incomplete type&gt;, [1] = &lt;incomplete type&gt;, [2] = &lt;incomplete type&gt;)
(array::Two[3]) ::array_of_two = ([0] = &lt;incomplete type&gt;, [1] = &lt;incomplete type&gt;, [2] = &lt;incomplete type&gt;)
(ShadowedOne) ::shadowed_one = (func_shadow::One = &lt;incomplete type&gt;, member = 47)
(lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one
(InheritsFromOne) ::inherits_from_one = {
  (One) One = &lt;incomplete type&gt; {}
  (int) member = 47
}
(InheritsFromTwo) ::inherits_from_two = {
  (Two) Two = &lt;incomplete type&gt; {}
  (int) member = 47
}
(OneAsMember) ::one_as_member = {
  (member::One) one = &lt;incomplete type&gt; {}
  (int) member = 47
}
(TwoAsMember) ::two_as_member = {
  (member::Two) two = &lt;incomplete type&gt; {}
  (int) member = 47
}
(array::One[3]) ::array_of_one = {
  (array::One) [0] = &lt;incomplete type&gt; {}
  (array::One) [1] = &lt;incomplete type&gt; {}
  (array::One) [2] = &lt;incomplete type&gt; {}
}
(array::Two[3]) ::array_of_two = {
  (array::Two) [0] = &lt;incomplete type&gt; {}
  (array::Two) [1] = &lt;incomplete type&gt; {}
  (array::Two) [2] = &lt;incomplete type&gt; {}
}
(ShadowedOne) ::shadowed_one = {
  (func_shadow::One) func_shadow::One = &lt;incomplete type&gt; {}
  (int) member = 47
}

Differential Revision: https://reviews.llvm.org/D138259
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][tests] Automatically call compute_mydir (NFC)</title>
<updated>2022-06-17T21:34:49+00:00</updated>
<author>
<name>Dave Lee</name>
<email>davelee.com@gmail.com</email>
</author>
<published>2022-06-17T00:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4cc8f2a017c76af25234afc7c380550e9c93135c'/>
<id>4cc8f2a017c76af25234afc7c380550e9c93135c</id>
<content type='text'>
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Skip TestLimitDebugInfo for Clang&lt;7</title>
<updated>2021-06-21T17:46:29+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2021-06-21T17:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1265f05c268f09c74a2ecaa3e2b3cea83ec10627'/>
<id>1265f05c268f09c74a2ecaa3e2b3cea83ec10627</id>
<content type='text'>
Without DW_CC_pass_by_* attributes that Clang 7 started to emit in this test
we don't properly read back the return value of the `get_*` functions and just
read bogus memory.

See also the TestReturnValue.py test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without DW_CC_pass_by_* attributes that Clang 7 started to emit in this test
we don't properly read back the return value of the `get_*` functions and just
read bogus memory.

See also the TestReturnValue.py test.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Check Decl kind when completing -flimit-debug-info types</title>
<updated>2020-08-14T10:31:37+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2020-08-13T13:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fdc6aea3fd822b639baaa5b666fdf7598d08c8de'/>
<id>fdc6aea3fd822b639baaa5b666fdf7598d08c8de</id>
<content type='text'>
The search for the complete class definition can also produce entries
which are not of the expected type. This can happen for instance when
there is a function with the same name as the class we're looking up
(which means that the class needs to be disambiguated with the
struct/class tag in most contexts).

Previously we were just picking the first Decl that the lookup returned,
which later caused crashes or assertion failures if it was not of the
correct type. This patch changes that to search for an entry of the
correct type.

Differential Revision: https://reviews.llvm.org/D85904
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The search for the complete class definition can also produce entries
which are not of the expected type. This can happen for instance when
there is a function with the same name as the class we're looking up
(which means that the class needs to be disambiguated with the
struct/class tag in most contexts).

Previously we were just picking the first Decl that the lookup returned,
which later caused crashes or assertion failures if it was not of the
correct type. This patch changes that to search for an entry of the
correct type.

Differential Revision: https://reviews.llvm.org/D85904
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb/DWARF] Don't treat class declarations with children as definitions</title>
<updated>2020-07-27T10:58:22+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2020-07-07T13:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1956cf1042d3c406d9e9cefe47d3b43adf2bdbe1'/>
<id>1956cf1042d3c406d9e9cefe47d3b43adf2bdbe1</id>
<content type='text'>
Summary:
This effectively reverts r188124, which added code to handle
(DW_AT_)declarations of structures with some kinds of children as
definitions. The commit message claims this is a workaround for some
kind of debug info produced by gcc. However, it does not go into
specifics, so it's hard to reproduce or verify that this is indeed still a
problem.

Having this code is definitely a problem though, because it mistakenly
declares incomplete dwarf declarations to be complete. Both clang (with
-flimit-debug-info) and gcc (by default) generate DW_AT_declarations of
structs with children. This happens when full debug info for a class is
not emitted in a given compile unit (e.g. because of vtable homing), but
the class has inline methods which are used in the given compile unit.
In that case, the compilers emit a DW_AT_declaration of a class, but
add a DW_TAG_subprogram child to it to describe the inlined instance of
the method.

Even though the class tag has some children, it definitely does not
contain enough information to construct a full class definition (most
notably, it lacks any members). Keeping the class as incomplete allows
us to search for a real definition in other modules, helping the
-flimit-debug-info flow. And in case the definition is not found we can
display a error message saying that, instead of just showing an empty
struct.

Reviewers: clayborg, aprantl, JDevlieghere, shafik

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D83302
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This effectively reverts r188124, which added code to handle
(DW_AT_)declarations of structures with some kinds of children as
definitions. The commit message claims this is a workaround for some
kind of debug info produced by gcc. However, it does not go into
specifics, so it's hard to reproduce or verify that this is indeed still a
problem.

Having this code is definitely a problem though, because it mistakenly
declares incomplete dwarf declarations to be complete. Both clang (with
-flimit-debug-info) and gcc (by default) generate DW_AT_declarations of
structs with children. This happens when full debug info for a class is
not emitted in a given compile unit (e.g. because of vtable homing), but
the class has inline methods which are used in the given compile unit.
In that case, the compilers emit a DW_AT_declaration of a class, but
add a DW_TAG_subprogram child to it to describe the inlined instance of
the method.

Even though the class tag has some children, it definitely does not
contain enough information to construct a full class definition (most
notably, it lacks any members). Keeping the class as incomplete allows
us to search for a real definition in other modules, helping the
-flimit-debug-info flow. And in case the definition is not found we can
display a error message saying that, instead of just showing an empty
struct.

Reviewers: clayborg, aprantl, JDevlieghere, shafik

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D83302
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb/DWARF] Look for complete array element definitions in other modules</title>
<updated>2020-07-06T08:09:13+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2020-07-06T08:09:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b65d4b23f6dd4da4277acbf2bb912becce4f8a57'/>
<id>b65d4b23f6dd4da4277acbf2bb912becce4f8a57</id>
<content type='text'>
This applies the same logic we have for incomplete class bases and
members to array element types.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This applies the same logic we have for incomplete class bases and
members to array element types.
</pre>
</div>
</content>
</entry>
</feed>
