9 Commits

Author SHA1 Message Date
Ryan Mansfield
4494c54326
[lldb] Fix typos in various help messages. (#109851) 2024-09-24 16:48:27 -07:00
Adrian Prantl
0642cd768b
[lldb] Turn lldb_private::Status into a value type. (#106163)
This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

`    ResultTy DoFoo(Status& error)
`
to

`    llvm::Expected<ResultTy> DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.
2024-08-27 10:59:31 -07:00
Med Ismail Bennani
5689cccead
[lldb] Rename scripting template to scripting extension (NFC) (#101935)
This patch renames the `scripting template` subcommand to be `scripting
extension` instead since that would make more sense for upcoming
commands.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-08-05 09:35:27 -07:00
Med Ismail Bennani
bccff3baef [lldb/Commands] Add scripting template list command with auto discovery
This patch introduces a new `template` multiword sub-command to the
`scripting` top-level command. As the name suggests, this sub-command
operates on scripting templates, and currently has the ability to
automatically discover the various scripting extensions that lldb
supports.

This was previously reviewed in #97273.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-07-27 13:36:30 -07:00
Med Ismail Bennani
e8504cb0c9
[lldb] Revert scripting template list patches (#100673)
Reverts https://github.com/llvm/llvm-project/pull/97273 since it broke
the windows bot:

https://lab.llvm.org/buildbot/#/builders/141/builds/1025/steps/4/logs/stdio
2024-07-25 17:11:36 -07:00
Med Ismail Bennani
2914a4b888 [lldb/Commands] Add scripting template list command with auto discovery
This patch introduces a new `template` multiword sub-command to the
`scripting` top-level command. As the name suggests, this sub-command
operates on scripting templates, and currently has the ability to
automatically discover the various scripting extensions that lldb
supports.

This was previously reviewed in #97273.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-07-25 00:12:06 -07:00
Med Ismail Bennani
39c23a31d2
Revert "[lldb/Commands] Add scripting template list command with auto discovery" (#100273)
Reverts llvm/llvm-project#97273 since it broke the windows bot:

https://lab.llvm.org/buildbot/#/builders/141/builds/1025/steps/4/logs/stdio
2024-07-23 16:04:48 -07:00
Med Ismail Bennani
43ca63149d
[lldb/Commands] Add scripting template list command with auto discovery (#97273)
This patch introduces a new `template` multiword sub-command to the
`scripting` top-level command. As the name suggests, this sub-command
operates on scripting templates, and currently has the ability to
automatically discover the various scripting extensions that lldb
supports.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-07-23 10:19:52 -07:00
Med Ismail Bennani
410de0c8c8
[lldb/Commands] Alias script command to scripting run (#97263)
This patch introduces a new top-level `scripting` command with an `run`
sub-command, that basically replaces the `script` raw command.

To avoid breaking the `script` command usages, this patch also adds an
`script` alias to the `scripting run` sub-command.

The reason behind this change is to have a top-level command that will
cover scripting related subcommands.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-07-01 21:35:21 -07:00