Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
0394e08b |
| 20-Nov-2024 |
Pavel Labath <pavel@labath.sk> |
[lldb] Reword the "line 0" warning (#116827)
We got a bug report that this message is confusing. In this particular
case, the line zero was due to compiler tail merging (in optimized
code). The ma
[lldb] Reword the "line 0" warning (#116827)
We got a bug report that this message is confusing. In this particular
case, the line zero was due to compiler tail merging (in optimized
code). The main issue was the "no source code" part: in this case it's
kind of incorrect because -- even though we can't really know that --
the address is arguably associated with *multiple* lines of source code.
I've tried to make the new wording more neutral, and added a wink
towards compiler optimizations. I left out the "compiler generated" part
of the message because I couldn't find a way to squeeze that in nicely.
I'm also not entirely sure what it was referring to -- if this was
(just) function prologue/epilogue, then maybe leaving it out is fine, as
we're not likely to stop there anyway (?)
I also left out the function name, because:
- for template functions it gets rather long
- it's already present in the message, potentially twice (once in the
"frame summary" line and once in the snippet of code we show for the
function declaration)
---------
Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
39b2979a |
| 13-Nov-2024 |
Pavel Labath <pavel@labath.sk> |
[lldb] Fix source display for artificial locations (#115876)
When retrieving the location of the function declaration, we were
dropping the file component on the floor, which resulted in an amusing
[lldb] Fix source display for artificial locations (#115876)
When retrieving the location of the function declaration, we were
dropping the file component on the floor, which resulted in an amusingly
confusing situation were we displayed the file containing the
implementation of the function, but used the line number of the
declaration. This patch fixes that.
It required a small refactor Function::GetStartLineSourceLineInfo to
return a SupportFile (instead of just the file spec), which in turn
necessitated changes in a couple of other places as well.
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3 |
|
#
66a2ed50 |
| 20-Mar-2024 |
Alex Langford <alangford@apple.com> |
[lldb] Remove process restart prompt from TestSourceManager (#85861)
In TestSourceManager, test_artificial_source_location will give the
process restart prompt if you run the test individually. The
[lldb] Remove process restart prompt from TestSourceManager (#85861)
In TestSourceManager, test_artificial_source_location will give the
process restart prompt if you run the test individually. The reason is
that we run the process twice: first using a convenience function to run
to a specific breakpoint and then again to check for a specific message
emitted when you hit the breakpoint. Instead of running twice and making
the test difficult to run individually, we can just check for the
specific messages using other commands.
show more ...
|
Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4 |
|
#
9c246882 |
| 21-Feb-2024 |
Jordan Rupprecht <rupprecht@google.com> |
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsne
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).
For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.
show more ...
|
Revision tags: llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
ecbe78c1 |
| 04-Aug-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Fix Python test formatting (NFC)
All Python files in the LLVM repository were reformatted with Black [1]. Files inside the LLDB subproject were reformatted in 2238dcc39358. This patch updates
[lldb] Fix Python test formatting (NFC)
All Python files in the LLVM repository were reformatted with Black [1]. Files inside the LLDB subproject were reformatted in 2238dcc39358. This patch updates a handful of tests that were added or modified since then and weren't formatted with Black.
[1] https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style/68257
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
51944e78 |
| 03-Jul-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Add two-level caching in the source manager
We recently saw an uptick in internal reports complaining that LLDB is slow when sources on network file systems are inaccessible. I looked at the
[lldb] Add two-level caching in the source manager
We recently saw an uptick in internal reports complaining that LLDB is slow when sources on network file systems are inaccessible. I looked at the SourceManger and its cache and I think there’s some room for improvement in terms of reducing file system accesses:
1. We always resolve the path. 2. We always check the timestamp. 3. We always recheck the file system for negative cache hits.
D153726 fixes (1) but (2) and (3) are necessary because of the cache’s current design. Source files are cached at the debugger level which means that the source file cache can span multiple targets and processes. It wouldn't be correct to not reload a modified or new file from disk.
We can however significantly reduce the number of file system accesses by using a two level cache design: one cache at the debugger level and one at the process level:
- The cache at the debugger level works the way it does today. There is no negative cache: if we can't find the file on disk, we'll try again next time the cache is queried. If a cached file's timestamp changes or if its path remapping changes, the cached file is evicted and we reload it from disk. - The cache at the process level is design to avoid accessing the file system. It doesn't check the file's modification time. It caches negative results, so if a file didn't exist, it doesn't try to reread it from disk. Checking if the path remapping changed is cheap (doesn't involve checking the file system) and is the only way for a file to get evicted from the process cache.
The result of this patch is that LLDB will not show you new content if a file is modified or created while a process is running. I would argue that this is what most people would expect, but it is a change from how LLDB behaves today.
For an average stop, we query the source cache 4 times. With the current implementation, that's 4 stats to get the modification time, If the file doesn't exist on disk, that's an additional 4 stats. Before D153726, if the path starts with a ~ there are another additional 4 calls to realpath. When debugging sources on a slow (network) file system, this quickly adds up.
In addition to the two level caching, this patch also adds a source logging channel and synchronization to the source file cache. The logging was helpful during development and hopefully will help us triage issues in the future. The synchronization isn't a new requirement: as the cache is shared across targets, there is no guarantees that it can't be accessed concurrently. The patch also fixes a bug where we would only set the source remapping ID if the un-remapped file didn't exist, which led to the file getting evicted from the cache on every access.
rdar://110787562
Differential revision: https://reviews.llvm.org/D153834
show more ...
|
#
d49caf4a |
| 26-Jun-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Add `source cache dump` and `source cache clear` subcommand
Add two new source subcommands: source cache dump and source cache clear. As the name implies the first one dumps the source cache
[lldb] Add `source cache dump` and `source cache clear` subcommand
Add two new source subcommands: source cache dump and source cache clear. As the name implies the first one dumps the source cache while the later clears the cache.
This patch was motivated by a handful of (internal) bug reports related to sources not being available. Right now those issues can be hard to diagnose. The new commands give users, as well as us as developers, more insight into and control over the source cache.
Differential revision: https://reviews.llvm.org/D153685
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
2238dcc3 |
| 25-May-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC][Py Reformat] Reformat python files in lldb
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 problem
[NFC][Py Reformat] Reformat python files in lldb
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 <yourfile>` 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
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6 |
|
#
71b2ff79 |
| 21-Nov-2022 |
Jordan Rupprecht <rupprecht@google.com> |
[test] Fix TestSourceManager when the source file is readonly.
This test copies main.c to main-copy.c and modifies main-copy.c while debugging, but main.c may have come from a readonly location, whi
[test] Fix TestSourceManager when the source file is readonly.
This test copies main.c to main-copy.c and modifies main-copy.c while debugging, but main.c may have come from a readonly location, which means writing to main-copy.c will fail because permissions are preserved. Run the equivalent of "chmod u+w" before attempting to modify it.
This effect can be seen by attempting to run this test after running `chmod u-w lldb/test/API/source-manager/main.c`
show more ...
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
193259cb |
| 12-Aug-2022 |
David Spickett <david.spickett@linaro.org> |
[LLDB] Remove __future__ imports from tests
Not needed now that we require python 3.
Reviewed By: kastiglione, JDevlieghere
Differential Revision: https://reviews.llvm.org/D131761
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
4cc8f2a0 |
| 17-Jun-2022 |
Dave Lee <davelee.com@gmail.com> |
[lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py.
Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py.
Differential Revision: https://reviews.llvm.org/D128077
show more ...
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
20db8e07 |
| 09-Dec-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Target] Refine source display warning for artificial locations (NFC)
This is a post-review update for D115313, to rephrase source display warning messages for artificial locations, making them
[lldb/Target] Refine source display warning for artificial locations (NFC)
This is a post-review update for D115313, to rephrase source display warning messages for artificial locations, making them more understandable for the end-user.
Differential Revision: https://reviews.llvm.org/D115461
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
edf410e4 |
| 08-Dec-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Target] Slide source display for artificial locations at function start
It can happen that a line entry reports that some source code is located at line 0. In DWARF, line 0 is a special locati
[lldb/Target] Slide source display for artificial locations at function start
It can happen that a line entry reports that some source code is located at line 0. In DWARF, line 0 is a special location which indicates that code has no 1-1 mapping with source.
When stopping in one of those artificial locations, lldb doesn't know which line to display and shows the beginning of the file instead.
This patch mitigates this behaviour by checking if the current symbol context of the line entry has a matching function, in which case, it slides the source listing to the start of that function.
This patch also shows the user a warning explaining why lldb couldn't show sources at that location.
rdar://83118425
Differential Revision: https://reviews.llvm.org/D115313
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-13.0.1-rc1 |
|
#
5015f250 |
| 29-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb/test] Fix TestSourceManager for eee887e0
I'm removing the extra trace commands as they're not compatible with windows, and there's no immediate replacement available.
|
#
b505ed9d |
| 30-Sep-2021 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Remove support for replaying the test suite from a reproducer
This patch removes the infrastructure to replay the test suite from a reproducer, as well as the modifications made to the indivi
[lldb] Remove support for replaying the test suite from a reproducer
This patch removes the infrastructure to replay the test suite from a reproducer, as well as the modifications made to the individual tests.
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
bc0a9a17 |
| 16-Jul-2020 |
Jim Ingham <jingham@apple.com> |
Add an option (-y) to "break set" and "source list" that uses the same file:line:column form that we use to print out locations. Since we print them this way it makes sense we also accept that form.
Add an option (-y) to "break set" and "source list" that uses the same file:line:column form that we use to print out locations. Since we print them this way it makes sense we also accept that form.
Differential Revision: https://reviews.llvm.org/D83975
show more ...
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
329abed1 |
| 22-May-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb/Reproducers] Skip test that changes the source file while debugging
The VFS is a snapshot and cannot capture changes to the file system.
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
#
d2e397f1 |
| 05-Mar-2020 |
Tatyana Krasnukha <tatyana@synopsys.com> |
[lldb][test] These tests don't fail on Windows anymore
|
Revision tags: llvmorg-10.0.0-rc3 |
|
#
841be985 |
| 24-Feb-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Color the line marker
Highlight the color marker similar to what we do for the column marker. The default color matches the color of the current PC marker (->) in the default disassembly form
[lldb] Color the line marker
Highlight the color marker similar to what we do for the column marker. The default color matches the color of the current PC marker (->) in the default disassembly format.
Differential revision: https://reviews.llvm.org/D75070
show more ...
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
99451b44 |
| 11-Feb-2020 |
Jordan Rupprecht <rupprecht@google.com> |
[lldb][test] Remove symlink for API tests.
Summary: Moves lldbsuite tests to lldb/test/API.
This is a largely mechanical change, moved with the following steps:
``` rm lldb/test/API/testcases mkdi
[lldb][test] Remove symlink for API tests.
Summary: Moves lldbsuite tests to lldb/test/API.
This is a largely mechanical change, moved with the following steps:
``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ```
lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.
Reviewers: labath, JDevlieghere
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71151
show more ...
|