fix(cli): print lldb by its path, and report a held app as held
Tried on the example with the app's sandbox, two things were wrong: - `debugger` printed `flatpak enter <id> lldb -p <pid>`, and flatpak enter runs a command without the sandbox's PATH, which /app/bin is on: "Failed to execute child process lldb". It now prints the path it found, /app/bin/lldb, which attached, listed threads and detached. - With the app held by that debugger, the handshake times out, and the client said "cannot reach basic on port ..." and exited 3, no instance, though its lock said it lived. It now says the app is alive but not answering, stopped in a debugger or hung, prints how to attach, check and end it, and exits 5. Environment::haveLldb becomes lldb, the path or empty. ShouldServeOverQuic covers the second with an instance whose lock is held and whose port is silent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2c77cdcfab
commit
5d34df7afb
5 changed files with 34 additions and 10 deletions
|
|
@ -58,8 +58,10 @@ export namespace Crafter::Debug::Cli {
|
|||
std::ostream* err = &std::cerr;
|
||||
// Where a screenshot without -o goes, relative paths included.
|
||||
std::filesystem::path cwd = std::filesystem::current_path();
|
||||
// Whether `lldb` exists here, for the attach command `debugger` prints.
|
||||
std::function<bool()> haveLldb;
|
||||
// Where lldb is here, for the attach command `debugger` prints: its
|
||||
// absolute path, since `flatpak enter` runs a command without the
|
||||
// sandbox's PATH, which /app/bin is on. Empty for none: gdb then.
|
||||
std::function<std::string()> lldb;
|
||||
};
|
||||
|
||||
std::int32_t Run(std::span<const std::string_view> args, Environment& environment);
|
||||
|
|
|
|||
Loading…
Reference in a new issue