Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Implement a formatter bytecode interpreter in C++ #9711

Open
wants to merge 14 commits into
base: stable/20240723
Choose a base branch
from

Conversation

adrian-prantl
Copy link

No description provided.

@adrian-prantl adrian-prantl requested a review from a team as a code owner December 10, 2024 18:36
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl requested review from kastiglione and JDevlieghere and removed request for a team December 10, 2024 18:36
@adrian-prantl
Copy link
Author

Intentionally not cherry-picking to 6.1, since this is still experimental.

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test windows

@adrian-prantl
Copy link
Author

@swift-ci test

royitaqi and others added 12 commits December 13, 2024 10:27
Improve the chance of resolving file/line breakpoints by realpath'ing the support files before doing a second match attempt, with some conditions applied.

A working [hello-world example](https://github.com/royitaqi/lldb_demos/blob/main/realpath/README.md).

See [patch](llvm#102223) for more info about problem/motivation, details of the feature, new settings, telemetries and tests.

(cherry picked from commit 47721d4)
…providers within lldb (llvm#102708)

This PR adds a statistics provider cache, which allows an individual
target to keep a rolling tally of it's total time and number of
invocations for a given summary provider. This information is then
available in statistics dump to help slow summary providers, and gleam
more into insight into LLDB's time use.

(cherry picked from commit 22144e2)
"statistics dump" currently report the statistics of all targets in
debugger instead of current target. This is wrong because there is a
"statistics dump --all-targets" option that supposed to include
everything.

This PR fixes the issue by only report statistics for current target
instead of all. It also includes the change to reset statistics debug
info/symbol table parsing/indexing time during debugger destroy. This is
required so that we report current statistics if we plan to reuse
lldb/lldb-dap across debug sessions

---------

Co-authored-by: jeffreytan81 <[email protected]>
(cherry picked from commit 24feaab)
…examples

This PR adds a proof-of-concept for a bytecode designed to ship and
run LLDB data formatters. More motivation and context can be found in
the formatter-bytecode.rst file and on discourse.

https://discourse.llvm.org/t/a-bytecode-for-lldb-data-formatters/82696

Relanding with a fix for a case-sensitive path.

(cherry picked from commit fffe8c6)
Compared to the python version, this also does type checking and error
handling, so it's slightly longer, however, it's still comfortably
under 500 lines.

(cherry picked from commit 9a9c1d4)
(cherry picked from commit e2bb474)
…vm#119620)

This trips UBSAN and probably isn't partiuclarly useful either.

(cherry picked from commit 2470cfa)
@adrian-prantl
Copy link
Author

@swift-ci test

The build break was caused by a [previous
patch](llvm#102223) using
`PATH_MAX` which is undefined in Windows.

(cherry picked from commit f377edb)
…104502)

# Part 1: Correctly fix a usage of `PATH_MAX`

TL;DR: Adding a typedef `lldb_private::PathSmallString` which contains a
hardcoded initial size (128).

# Part 2: Fix unit tests

After llvm#104493 fixed the build
break for Windows, unit test failure showed up for Windows. The
root-cause is that the `FileSpec`'s in the unit tests are not
style-specific. The fix is to apply either `WindowsSpec` or `PosixSpec`
specifically.

(cherry picked from commit 26670e7)
@adrian-prantl
Copy link
Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants