edb-debugger-git: Add more Q_OS_NETBSD

This commit is contained in:
Kamil Rytarowski 2017-02-19 02:06:50 +01:00
parent 773475b9ca
commit 424ec747b6
6 changed files with 80 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Size (edb-debugger-0.9.21.tar.gz) = 996932 bytes
SHA1 (patch-CMakeLists.txt) = d714177643b1f8b3a37c8d6bd51953c5fb296239
SHA1 (patch-include_os_unix_OSTypes.h) = bc7d3f584c7e8e40ad029e83141a186629b4c1eb
SHA1 (patch-include_os_unix_netbsd_linker.h) = d09a31187b4e7c0d4a20db6c32806cc8fd710538
SHA1 (patch-plugins_Analyzer_Analyzer.cpp) = 511efa03a82a96612d64fd43b9e6631e4d6aeb76
SHA1 (patch-plugins_Assembler_DialogAssembler.cpp) = 2bd6418dc078aae0c84c6092f15619e202e43b31
SHA1 (patch-plugins_DebuggerCore_CMakeLists.txt) = 18b3f0bd7c7c7ec4eaa6526c81b7c4299c7ee3f4
SHA1 (patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp) = e48d60ec404717b0822ddd75bb69ea7b2360230e
@ -29,4 +30,7 @@ SHA1 (patch-plugins_DebuggerCore_unix_netbsd_PlatformThread.cpp) = e3fb003a591a6
SHA1 (patch-plugins_DebuggerCore_unix_netbsd_PlatformThread.h) = bb93f03d6290c894ce543d2ea51f5023093a0fa3
SHA1 (patch-plugins_HeapAnalyzer_DialogHeap.cpp) = a11c5aeb91168f4bf2f58fa35137fec2d5107ea4
SHA1 (patch-plugins_ProcessProperties_DialogProcessProperties.cpp) = 31d9915e63a963fdd597dc141e3424fa8f05e81b
SHA1 (patch-src_Debugger.cpp) = 386f997b40925f3a418ee8c3fb9f3c72ce67a72d
SHA1 (patch-src_Debugger.cpp) = 3e0c929169c464f3697b28a5f00c1b8e877c7da3
SHA1 (patch-src_Debugger.h) = fe205b0ec0f55e336fd6d2fb9f633fca4435df38
SHA1 (patch-src_DialogInputValue.cpp) = 1ee3b62d4353840a5c5d0822471d4a4d75bb8112
SHA1 (patch-src_edb.cpp) = 1299bbe9cd055f29e6bf7fa391a1334e9a5ce1f5

View File

@ -0,0 +1,13 @@
$NetBSD$
--- plugins/Analyzer/Analyzer.cpp.orig 2017-02-18 21:21:09.000000000 +0000
+++ plugins/Analyzer/Analyzer.cpp
@@ -868,7 +868,7 @@ bool Analyzer::will_return(edb::address_
return false;
}
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
if(func_name == "_Unwind_Resume") {
return false;
}

View File

@ -94,3 +94,12 @@ $NetBSD$
// we attempt to reuse an open output window
if(edb::v1::config().tty_enabled && tty_proc_->state() != QProcess::Running) {
const QString command = edb::v1::config().tty_command;
@@ -2130,7 +2171,7 @@ edb::EVENT_STATUS Debugger::handle_trap(
state.set_instruction_pointer(previous_ip);
edb::v1::debugger_core->set_state(state);
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
// test if we have hit our internal LD hook BP. If so, read in the r_debug
// struct so we can get the state, then we can just resume
// TODO(eteran): add an option to let the user stop of debug events

View File

@ -0,0 +1,13 @@
$NetBSD$
--- src/Debugger.h.orig 2017-02-18 21:21:09.000000000 +0000
+++ src/Debugger.h
@@ -325,7 +325,7 @@ private:
IDebugEvent::const_pointer last_event_;
QLabel * status_;
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
edb::address_t debug_pointer_;
bool dynamic_info_bp_set_;
#endif

View File

@ -0,0 +1,27 @@
$NetBSD$
--- src/DialogInputValue.cpp.orig 2017-02-18 21:21:09.000000000 +0000
+++ src/DialogInputValue.cpp
@@ -26,6 +26,22 @@ along with this program. If not, see <h
#include "ui_DialogInputValue.h"
+#if !defined(LONG_LONG_MIN)
+#define LONG_LONG_MIN LLONG_MIN
+#endif
+
+#if !defined(LONG_LONG_MAX)
+#define LONG_LONG_MAX LLONG_MAX
+#endif
+
+#if !defined(ULONG_LONG_MIN)
+#define ULONG_LONG_MIN ULLONG_MIN
+#endif
+
+#if !defined(ULONG_LONG_MAX)
+#define ULONG_LONG_MAX ULLONG_MAX
+#endif
+
//------------------------------------------------------------------------------
// Name: DialogInputValue
// Desc:

View File

@ -0,0 +1,13 @@
$NetBSD$
--- src/edb.cpp.orig 2017-02-18 21:21:09.000000000 +0000
+++ src/edb.cpp
@@ -966,7 +966,7 @@ IRegion::pointer primary_data_region() {
//------------------------------------------------------------------------------
IRegion::pointer primary_code_region() {
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
if(debugger_core) {
if(IProcess *process = debugger_core->process()) {
const address_t address = process->code_address();