[Lldb-commits] [PATCH] D78839: [lldb-vscode] Add an option for loading core files
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 27 04:15:25 PDT 2020
labath added a comment.
In D78839#2004278 <https://reviews.llvm.org/D78839#2004278>, @clayborg wrote:
> You might look around for a core file in another test location and be able to use that.
Yep, there's plenty to choose from in `test/API/functionalities/postmortem/elf-core/`.
================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:533
auto attachCommands = GetStrings(arguments, "attachCommands");
- g_vsc.stop_at_entry = GetBoolean(arguments, "stopOnEntry", false);
+ auto core_file = GetString(arguments, "coreFile");
+ g_vsc.stop_at_entry =
----------------
I can't tell what does this return from this snippet. I don't think this is a good use of `auto`.
================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:577
+ else
+ g_vsc.target.LoadCore(core_file.data(), error);
// Reenable async events
----------------
Judging by this, it probably returns a StringRef. Is it always guaranteed to be null-terminated?
================
Comment at: lldb/tools/lldb-vscode/package.json:226
+ "type": "string",
+ "description": "Path to the core file to debug. It's necessary to specify the \"program\" argument as well."
}
----------------
Is the second part really true? lldb is able to open a core file without specifying the main executable (and in some cases it will even automatically find the matching executable).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78839/new/
https://reviews.llvm.org/D78839
More information about the lldb-commits
mailing list