Debugger: Add core file request to DebuggerInterface.
{CoreFile,Local}DebuggerInterface: - Add virtual hook for requesting a core dump of the current team. Implement accordingly in LocalDebuggerInterface, and add a no-op stub in CoreFileDebuggerInterface.
This commit is contained in:
parent
42f9500235
commit
bac2e686dc
@ -89,6 +89,8 @@ public:
|
|||||||
|
|
||||||
virtual status_t GetCpuFeatures(uint32& flags) = 0;
|
virtual status_t GetCpuFeatures(uint32& flags) = 0;
|
||||||
|
|
||||||
|
virtual status_t WriteCoreFile(const char* path) = 0;
|
||||||
|
|
||||||
// TeamMemory
|
// TeamMemory
|
||||||
virtual status_t GetMemoryProperties(target_addr_t address,
|
virtual status_t GetMemoryProperties(target_addr_t address,
|
||||||
uint32& protection, uint32& locking) = 0;
|
uint32& protection, uint32& locking) = 0;
|
||||||
|
@ -304,6 +304,13 @@ CoreFileDebuggerInterface::GetCpuFeatures(uint32& flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
CoreFileDebuggerInterface::WriteCoreFile(const char* path)
|
||||||
|
{
|
||||||
|
return B_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
CoreFileDebuggerInterface::GetMemoryProperties(target_addr_t address,
|
CoreFileDebuggerInterface::GetMemoryProperties(target_addr_t address,
|
||||||
uint32& protection, uint32& locking)
|
uint32& protection, uint32& locking)
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
|
|
||||||
virtual status_t GetCpuFeatures(uint32& flags);
|
virtual status_t GetCpuFeatures(uint32& flags);
|
||||||
|
|
||||||
|
virtual status_t WriteCoreFile(const char* path);
|
||||||
|
|
||||||
// TeamMemory
|
// TeamMemory
|
||||||
virtual status_t GetMemoryProperties(target_addr_t address,
|
virtual status_t GetMemoryProperties(target_addr_t address,
|
||||||
uint32& protection, uint32& locking);
|
uint32& protection, uint32& locking);
|
||||||
|
@ -733,6 +733,27 @@ LocalDebuggerInterface::GetCpuFeatures(uint32& flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
LocalDebuggerInterface::WriteCoreFile(const char* path)
|
||||||
|
{
|
||||||
|
DebugContextGetter contextGetter(fDebugContextPool);
|
||||||
|
|
||||||
|
debug_nub_write_core_file_reply reply;
|
||||||
|
|
||||||
|
debug_nub_write_core_file message;
|
||||||
|
message.reply_port = contextGetter.Context()->reply_port;
|
||||||
|
strlcpy(message.path, path, sizeof(message.path));
|
||||||
|
|
||||||
|
status_t error = send_debug_message(contextGetter.Context(),
|
||||||
|
B_DEBUG_WRITE_CORE_FILE, &message, sizeof(message), &reply,
|
||||||
|
sizeof(reply));
|
||||||
|
if (error == B_OK)
|
||||||
|
error = reply.error;
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
LocalDebuggerInterface::GetMemoryProperties(target_addr_t address,
|
LocalDebuggerInterface::GetMemoryProperties(target_addr_t address,
|
||||||
uint32& protection, uint32& locking)
|
uint32& protection, uint32& locking)
|
||||||
|
@ -61,6 +61,8 @@ public:
|
|||||||
|
|
||||||
virtual status_t GetCpuFeatures(uint32& flags);
|
virtual status_t GetCpuFeatures(uint32& flags);
|
||||||
|
|
||||||
|
virtual status_t WriteCoreFile(const char* path);
|
||||||
|
|
||||||
// TeamMemory
|
// TeamMemory
|
||||||
virtual status_t GetMemoryProperties(target_addr_t address,
|
virtual status_t GetMemoryProperties(target_addr_t address,
|
||||||
uint32& protection, uint32& locking);
|
uint32& protection, uint32& locking);
|
||||||
|
Loading…
Reference in New Issue
Block a user