| 407 | } |
| 408 | |
| 409 | bool MIDebugSession::examineCoreFile(const QUrl &debugee, const QUrl &coreFile) |
| 410 | { |
| 411 | emit showMessage(i18n("Examining core file %1", coreFile.toLocalFile()), 1000); |
| 412 | |
| 413 | if (debuggerStateIsOn(s_dbgNotStarted)) { |
| 414 | // FIXME: use global launch configuration rather than nullptr |
| 415 | if (!startDebugger(nullptr)) { |
| 416 | return false; |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | // FIXME: support non-local URLs |
| 421 | const auto debugeePath = debugee.toLocalFile(); |
| 422 | |
| 423 | // If the file argument is not passed to the MI command -file-exec-and-symbols, GDB/MI clears the executable and |
| 424 | // symbol information. But since such information is absent at this time, sending the command is not useful. |
| 425 | // LLDB-MI does not support the absence of the file argument and replies to the bare |
| 426 | // -file-exec-and-symbols command with an error that terminates the debug session: |
| 427 | // 5^error,msg="Command 'file-exec-and-symbols'. Command Args. Validation failed. Mandatory args not found: file" |
| 428 | // Examining a core file works both with GDB and with LLDB if the command -file-exec-and-symbols is not sent at all. |
| 429 | if (!debugeePath.isEmpty()) { |
| 430 | addFileExecAndSymbolsCommand(debugeePath); |
| 431 | raiseEvent(connected_to_program); |
| 432 | } |
| 433 | |
| 434 | loadCoreFile(coreFile.toLocalFile()); |
| 435 | raiseEvent(program_state_changed); |
| 436 | |
| 437 | return true; |
| 438 | } |
| 439 | |
| 440 | void MIDebugSession::initializeToolViewFactoryHolder(ToolViewFactoryHolderPtr&& holder) |
| 441 | { |