Debugger: Implement remainder of #12729.

UserInterfaceListener:
- Add request hook for writing a core file. Implement in TeamDebugger.

Jobs/WriteCoreFileJob:
- Add new job to actually dispatch the core file request via the debugger
  interface.

Team{::Listener}
- Add listener event + hook for notifications when a core file gets written.
  Implement in CLI.

CliContext:
- Add event flag for core file changed.

CommandLineUserInterface:
- Add 'write-core' command. This optionally takes a path to write the core to,
  otherwise one is automatically generated by, similarly to debug reports. As
  such, one can now generate cores for things like app_server and registrar
  crashes if desired, in addition to reports.
This commit is contained in:
Rene Gollent
2016-04-26 22:36:26 -04:00
parent 5c8966c740
commit e2d845a47f
16 changed files with 284 additions and 8 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2015, Rene Gollent, [email protected].
* Copyright 2011-2016, Rene Gollent, [email protected].
* Copyright 2012, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
@@ -28,6 +28,7 @@
#include "CliThreadCommand.h"
#include "CliThreadsCommand.h"
#include "CliVariablesCommand.h"
#include "CliWriteCoreFileCommand.h"
static const char* kDebuggerPrompt = "debugger> ";
@@ -311,7 +312,9 @@ CommandLineUserInterface::_RegisterCommands()
&& _RegisterCommand("thread", new(std::nothrow) CliThreadCommand)
&& _RegisterCommand("threads", new(std::nothrow) CliThreadsCommand)
&& _RegisterCommand("variables",
new(std::nothrow) CliVariablesCommand)) {
new(std::nothrow) CliVariablesCommand)
&& _RegisterCommand("write-core",
new(std::nothrow) CliWriteCoreFileCommand)) {
fCommands.SortItems(&_CompareCommandEntries);
return B_OK;
}