hrev50738 adds 13 changesets to branch 'master'
old head: ca55f16f036b0bfd69f9d3b8c09b82693beff841
new head: e218ec028869b8d4da1a0b7ee6ffa008b3efe748
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=e218ec028869+%5Eca55f16f036b
----------------------------------------------------------------------------
bcca096ae535: libdebugger: Fix header order in RemoteDebugRequest.
9e4d0fd483ff: libdebugger: Implement remaining remote request/response pairs.
25ec63dbf549: libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for
a remote interface.
692fe5550319: libdebugger: Add initial version of network interface.
NetworkTargetHostInterface{Info}:
- Barebones classes for implementing a target host interface over TCP.
365840af1c80: Debugger: Adjust TeamsWindow for connection selection.
TeamsWindow:
- Add Listener interface for selected target host interface changes.
- Add menu field to display/choose between active host connections.
- Add button to create a new connection (not yet functional).
TeamsListView:
- Implement TeamsWindow Listener interface to decide when to update
the displayed team list.
- Remove unused current team ID.
918f4a073309: Debugger: StartTeamWindow Style fix.
10ba334855ad: Debugger: Cleanup.
- Split MessageCodes.h into a second file that separates out the
application-specific message codes from those used by the core.
Adjust includes accordingly. No functional change.
c521fed0dae6: Debugger: Add connection configuration window.
ConnectionConfigWindow:
- Utility window that is spawned in response to requests to create a new
remote host connection. Allows setting up and attempting to make a
connection.
c4b2191889cb: Debugger: Fix incorrect indentation.
445f00371c94: Debugger: Implement spawning connection window.
TeamsWindow:
- Create new connection button now sends a message to the main app,
which manages the connection window as a singleton.
Debugger:
- Handle creating/showing connection configuration window as requested.
eede6646dd54: Debugger: Add connection config handler framework.
ConnectionConfigHandler:
- Abstract base class for the different types of connection that allows one to
retrieve an appropriate configuration view based on the target host
interface
type. This will allow the configuration window to switch dynamically between
network, USB, etc. without having to know the details of any of those.
Initially only a network subclass has been implemented though.
ConnectionConfigHandlerRoster:
- Keeps track of the list of available config handlers, and handles mapping a
request for a given interface info to the appropriate type of handler.
ConnectionConfigView:
- Abstract base class for the actual configuration views returned by the
config
handlers. This exposes a listener interface via which the view can notify
an interested party that the configuration has been changed.
Correspondingly,
the configuration window will use this to determine if the configuration is
complete enough to allow a connection attempt.
7e6e3c1be2d2: Debugger: Implement use of connection config roster.
Debugger:
- Initialize/Deinitialize roster as appropriate.
ConnectionConfigWindow:
- Implement config view listener interface, and use roster
to retrieve and add appropriate config view when switching
between interface types.
e218ec028869: Debugger: Hide connection controls.
TeamsWindow:
- As the functionality isn't yet actually ready, hide the controls in the
teams window for now.
[ Rene Gollent <rene@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
47 files changed, 1697 insertions(+), 112 deletions(-)
headers/private/debugger/MessageCodes.h | 51 +----
.../private/debugger/settings/generic/Setting.h | 28 ++-
src/apps/debugger/AppMessageCodes.h | 59 ++++++
src/apps/debugger/Debugger.cpp | 46 ++++-
src/apps/debugger/Jamfile | 17 +-
.../ConnectionConfigHandler.cpp | 17 ++
.../connection_config/ConnectionConfigHandler.h | 32 ++++
.../ConnectionConfigHandlerRoster.cpp | 135 +++++++++++++
.../ConnectionConfigHandlerRoster.h | 55 ++++++
.../connection_config/ConnectionConfigView.cpp | 42 ++++
.../gui/connection_config/ConnectionConfigView.h | 45 +++++
.../NetworkConnectionConfigHandler.cpp | 44 +++++
.../NetworkConnectionConfigHandler.h | 22 +++
.../NetworkConnectionConfigView.cpp | 87 +++++++++
.../NetworkConnectionConfigView.h | 33 ++++
.../ExpressionEvaluationWindow.cpp | 1 +
.../gui/inspector_window/InspectorWindow.cpp | 1 +
.../team_settings_window/ImageStopConfigView.cpp | 1 +
.../team_settings_window/SignalsConfigView.cpp | 1 +
.../team_settings_window/TeamSettingsWindow.cpp | 4 +-
.../gui/team_window/BreakpointsView.cpp | 3 +-
.../gui/team_window/RegistersView.cpp | 4 +-
.../gui/team_window/SourceView.cpp | 1 +
.../gui/team_window/TeamWindow.cpp | 1 +
.../gui/team_window/VariablesView.cpp | 1 +
.../gui/teams_window/TeamsListView.cpp | 56 ++++--
.../gui/teams_window/TeamsListView.h | 14 +-
.../gui/teams_window/TeamsWindow.cpp | 118 +++++++++++-
.../gui/teams_window/TeamsWindow.h | 28 +++
.../user_interface/gui/util/SettingsMenu.cpp | 2 +-
.../gui/utility_windows/BreakpointEditWindow.cpp | 6 +-
.../utility_windows/ConnectionConfigWindow.cpp | 190 +++++++++++++++++++
.../gui/utility_windows/ConnectionConfigWindow.h | 56 ++++++
.../utility_windows/ExpressionPromptWindow.cpp | 4 +-
.../SignalDispositionEditWindow.cpp | 6 +-
.../gui/utility_windows/StartTeamWindow.cpp | 5 +-
.../gui/utility_windows/VariableEditWindow.cpp | 2 +-
.../gui/utility_windows/WatchPromptWindow.cpp | 3 +-
src/kits/debugger/Jamfile | 5 +
.../remote/RemoteDebugRequest.cpp | 183 +++++++++++++++++-
.../remote/RemoteDebugRequest.h | 91 ++++++++-
src/kits/debugger/settings/generic/Setting.cpp | 38 +++-
.../TargetHostInterfaceRoster.cpp | 2 +
.../network/NetworkTargetHostInterface.cpp | 99 ++++++++++
.../network/NetworkTargetHostInterface.h | 40 ++++
.../network/NetworkTargetHostInterfaceInfo.cpp | 100 ++++++++++
.../network/NetworkTargetHostInterfaceInfo.h | 30 +++
############################################################################
Commit: bcca096ae535e5b2978a12b302412a86d7922bc5
URL: http://cgit.haiku-os.org/haiku/commit/?id=bcca096ae535
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Mon Aug 1 00:24:26 2016 UTC
libdebugger: Fix header order in RemoteDebugRequest.
----------------------------------------------------------------------------
diff --git a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
index 001339f..8fb62c8 100644
--- a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
+++ b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
@@ -6,14 +6,16 @@
#include "RemoteDebugRequest.h"
-#include "Architecture.h"
-#include "CpuState.h"
-
-#include <AutoDeleter.h>
+#include <stdlib.h>
#include <Message.h>
-#include <stdlib.h>
+#include <debugger.h>
+
+#include <AutoDeleter.h>
+
+#include "Architecture.h"
+#include "CpuState.h"
// #pragma mark - RemoteDebugRequest
diff --git a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
index 4bd24c7..71f819d 100644
--- a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
+++ b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
@@ -5,11 +5,11 @@
#ifndef REMOTE_DEBUG_REQUEST_H
#define REMOTE_DEBUG_REQUEST_H
-#include "Types.h"
+#include <OS.h>
#include <Referenceable.h>
-#include <OS.h>
+#include "Types.h"
enum remote_request_type {
@@ -23,10 +23,10 @@ enum remote_request_type {
REMOTE_REQUEST_TYPE_SINGLE_STEP_THREAD,
REMOTE_REQUEST_TYPE_GET_CPU_STATE,
REMOTE_REQUEST_TYPE_SET_CPU_STATE,
- REMOTE_REQUEST_TYPE_SET_BREAKPOINT,
- REMOTE_REQUEST_TYPE_CLEAR_BREAKPOINT,
- REMOTE_REQUEST_TYPE_SET_WATCHPOINT,
- REMOTE_REQUEST_TYPE_CLEAR_WATCHPOINT,
+ REMOTE_REQUEST_TYPE_INSTALL_BREAKPOINT,
+ REMOTE_REQUEST_TYPE_UNINSTALL_BREAKPOINT,
+ REMOTE_REQUEST_TYPE_INSTALL_WATCHPOINT,
+ REMOTE_REQUEST_TYPE_UNINSTALL_WATCHPOINT,
REMOTE_REQUEST_TYPE_PREPARE_HANDOVER,
REMOTE_REQUEST_TYPE_WRITE_CORE_FILE,
############################################################################
Commit: 9e4d0fd483ff312734c1c56a52a8acb1aa624d28
URL: http://cgit.haiku-os.org/haiku/commit/?id=9e4d0fd483ff
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Mon Aug 1 00:24:58 2016 UTC
libdebugger: Implement remaining remote request/response pairs.
----------------------------------------------------------------------------
diff --git a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
index 8fb62c8..72a76a9 100644
--- a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
+++ b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.cpp
@@ -608,6 +608,177 @@ RemoteDebugSetCpuStateRequest::SaveSpecificInfoToMessage(
}
+// #pragma mark - RemoteDebugAddressActionRequest
+
+
+RemoteDebugAddressActionRequest::RemoteDebugAddressActionRequest()
+ :
+ RemoteDebugRequest(),
+ fAddress(0)
+{
+}
+
+
+RemoteDebugAddressActionRequest::~RemoteDebugAddressActionRequest()
+{
+}
+
+
+void
+RemoteDebugAddressActionRequest::SetTo(target_addr_t address)
+{
+ fAddress = address;
+}
+
+
+status_t
+RemoteDebugAddressActionRequest::LoadSpecificInfoFromMessage(
+ const BMessage& data)
+{
+ return data.FindUInt64("address", &fAddress);
+}
+
+
+status_t
+RemoteDebugAddressActionRequest::SaveSpecificInfoToMessage(
+ BMessage& _output) const
+{
+ return _output.AddUInt64("address", fAddress);
+}
+
+
+// #pragma mark - RemoteDebugInstallBreakpointRequest
+
+
+RemoteDebugInstallBreakpointRequest::RemoteDebugInstallBreakpointRequest()
+ :
+ RemoteDebugAddressActionRequest()
+{
+}
+
+
+RemoteDebugInstallBreakpointRequest::~RemoteDebugInstallBreakpointRequest()
+{
+}
+
+
+remote_request_type
+RemoteDebugInstallBreakpointRequest::Type() const
+{
+ return REMOTE_REQUEST_TYPE_INSTALL_BREAKPOINT;
+}
+
+
+// #pragma mark - RemoteDebugUninstallBreakpointRequest
+
+
+RemoteDebugUninstallBreakpointRequest::RemoteDebugUninstallBreakpointRequest()
+ :
+ RemoteDebugAddressActionRequest()
+{
+}
+
+
+RemoteDebugUninstallBreakpointRequest::~RemoteDebugUninstallBreakpointRequest()
+{
+}
+
+remote_request_type
+RemoteDebugUninstallBreakpointRequest::Type() const
+{
+ return REMOTE_REQUEST_TYPE_UNINSTALL_BREAKPOINT;
+}
+
+
+// #pragma mark - RemoteDebugInstallWatchpointRequest
+
+
+RemoteDebugInstallWatchpointRequest::RemoteDebugInstallWatchpointRequest()
+ :
+ RemoteDebugRequest(),
+ fAddress(0),
+ fWatchType(B_DATA_READ_WATCHPOINT),
+ fLength(0)
+{
+}
+
+
+RemoteDebugInstallWatchpointRequest::~RemoteDebugInstallWatchpointRequest()
+{
+}
+
+
+void
+RemoteDebugInstallWatchpointRequest::SetTo(target_addr_t address, uint32 type,
+ int32 length)
+{
+ fAddress = address;
+ fWatchType = type;
+ fLength = length;
+}
+
+
+remote_request_type
+RemoteDebugInstallWatchpointRequest::Type() const
+{
+ return REMOTE_REQUEST_TYPE_INSTALL_WATCHPOINT;
+}
+
+
+status_t
+RemoteDebugInstallWatchpointRequest::LoadSpecificInfoFromMessage(
+ const BMessage& data)
+{
+ status_t error = data.FindUInt64("address", &fAddress);
+ if (error != B_OK)
+ return error;
+
+ error = data.FindUInt32("watchtype", &fWatchType);
+ if (error != B_OK)
+ return error;
+
+ return data.FindInt32("length", &fLength);
+}
+
+
+status_t
+RemoteDebugInstallWatchpointRequest::SaveSpecificInfoToMessage(
+ BMessage& _output) const
+{
+ status_t error = _output.AddUInt64("address", fAddress);
+ if (error != B_OK)
+ return error;
+
+ error = _output.AddUInt32("watchtype", fWatchType);
+ if (error != B_OK)
+ return error;
+
+ return _output.AddInt32("length", fLength);
+}
+
+
+// #pragma mark - RemoteDebugUninstallWatchpointRequest
+
+
+RemoteDebugUninstallWatchpointRequest::RemoteDebugUninstallWatchpointRequest()
+ :
+ RemoteDebugAddressActionRequest()
+{
+}
+
+
+RemoteDebugUninstallWatchpointRequest::~RemoteDebugUninstallWatchpointRequest()
+{
+}
+
+
+remote_request_type
+RemoteDebugUninstallWatchpointRequest::Type() const
+{
+ return REMOTE_REQUEST_TYPE_UNINSTALL_WATCHPOINT;
+}
+
+
// #pragma mark - RemoteDebugReadMemoryResponse
diff --git a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
index 71f819d..3c1de36 100644
--- a/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
+++ b/src/kits/debugger/debugger_interface/remote/RemoteDebugRequest.h
@@ -296,6 +296,85 @@ private:
};
+// abstract base for the various actions that influence how the CPU
+// reacts to a particular memory address, ergo break/watchpoints.
+class RemoteDebugAddressActionRequest : public RemoteDebugRequest {
+public:
+
RemoteDebugAddressActionRequest();
+ virtual
~RemoteDebugAddressActionRequest();
+
+ void SetTo(target_addr_t
address);
+
+ target_addr_t Address() const { return
fAddress; }
+
+protected:
+ virtual status_t LoadSpecificInfoFromMessage(
+ const
BMessage& data);
+ virtual status_t SaveSpecificInfoToMessage(
+
BMessage& _output) const;
+
+private:
+ target_addr_t fAddress;
+};
+
+
+class RemoteDebugInstallBreakpointRequest
+ : public RemoteDebugAddressActionRequest {
+public:
+
RemoteDebugInstallBreakpointRequest();
+ virtual
~RemoteDebugInstallBreakpointRequest();
+
+ virtual remote_request_type Type() const;
+};
+
+
+class RemoteDebugUninstallBreakpointRequest
+ : public RemoteDebugAddressActionRequest {
+public:
+
RemoteDebugUninstallBreakpointRequest();
+ virtual
~RemoteDebugUninstallBreakpointRequest();
+
+ virtual remote_request_type Type() const;
+};
+
+
+class RemoteDebugInstallWatchpointRequest : public RemoteDebugRequest {
+public:
+
RemoteDebugInstallWatchpointRequest();
+ virtual
~RemoteDebugInstallWatchpointRequest();
+
+ void SetTo(target_addr_t
address, uint32 type,
+ int32
length);
+
+ target_addr_t Address() const {
return fAddress; }
+ uint32 WatchType() const
{ return fWatchType; }
+ int32 Length() const
{ return fLength; }
+
+ virtual remote_request_type Type() const;
+
+protected:
+ virtual status_t LoadSpecificInfoFromMessage(
+ const
BMessage& data);
+ virtual status_t SaveSpecificInfoToMessage(
+
BMessage& _output) const;
+
+private:
+ target_addr_t fAddress;
+ uint32 fWatchType;
+ int32 fLength;
+};
+
+
+class RemoteDebugUninstallWatchpointRequest
+ : public RemoteDebugAddressActionRequest {
+public:
+
RemoteDebugUninstallWatchpointRequest();
+ virtual
~RemoteDebugUninstallWatchpointRequest();
+
+ virtual remote_request_type Type() const;
+};
+
+
// #pragma mark - Responses
############################################################################
Commit: 25ec63dbf549021ab04886bc960d771fcc2ef488
URL: http://cgit.haiku-os.org/haiku/commit/?id=25ec63dbf549
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Fri Nov 25 23:03:23 2016 UTC
libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for
a remote interface.
----------------------------------------------------------------------------
diff --git a/headers/private/debugger/settings/generic/Setting.h
b/headers/private/debugger/settings/generic/Setting.h
index baa8803..3a1a1c2 100644
--- a/headers/private/debugger/settings/generic/Setting.h
+++ b/headers/private/debugger/settings/generic/Setting.h
@@ -1,6 +1,6 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
- * Copyright 2011-2013, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2011-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#ifndef SETTING_H
@@ -20,7 +20,8 @@ enum setting_type {
SETTING_TYPE_OPTIONS,
SETTING_TYPE_BOUNDED,
SETTING_TYPE_RANGE,
- SETTING_TYPE_RECT
+ SETTING_TYPE_RECT,
+ SETTING_TYPE_STRING
};
@@ -106,6 +107,16 @@ public:
};
+class StringSetting : public virtual Setting {
+public:
+ virtual setting_type Type() const;
+
+ virtual BVariant DefaultValue() const;
+
+ virtual const BString& DefaultStringValue() const = 0;
+};
+
+
class AbstractSetting : public virtual Setting {
public:
AbstractSetting(const BString& id,
@@ -230,4 +241,17 @@ private:
};
+class StringSettingImpl : public AbstractSetting, public StringSetting {
+public:
+
StringSettingImpl(const BString& id,
+ const
BString& name,
+ const
BString& defaultValue);
+
+ virtual const BString& DefaultStringValue() const;
+
+private:
+ BString fDefaultValue;
+};
+
+
#endif // SETTING_H
diff --git a/src/kits/debugger/settings/generic/Setting.cpp
b/src/kits/debugger/settings/generic/Setting.cpp
index 3213649..440bae3 100644
--- a/src/kits/debugger/settings/generic/Setting.cpp
+++ b/src/kits/debugger/settings/generic/Setting.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2013, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2013-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
* Distributed under the terms of the MIT License.
*/
@@ -115,6 +115,23 @@ RectSetting::DefaultValue() const
}
+// #pragma mark - StringSetting
+
+
+setting_type
+StringSetting::Type() const
+{
+ return SETTING_TYPE_STRING;
+}
+
+
+BVariant
+StringSetting::DefaultValue() const
+{
+ return DefaultStringValue().String();
+}
+
+
// #pragma mark - AbstractSetting
@@ -399,3 +416,22 @@ RectSettingImpl::DefaultRectValue() const
{
return fDefaultValue;
}
+
+
+// #pragma mark - StringSettingImpl
+
+
+StringSettingImpl::StringSettingImpl(const BString& id, const BString& name,
+ const BString& defaultValue)
+ :
+ AbstractSetting(id, name),
+ fDefaultValue(defaultValue)
+{
+}
+
+
+const BString&
+StringSettingImpl::DefaultStringValue() const
+{
+ return fDefaultValue;
+}
############################################################################
Commit: 692fe5550319c0342c9525e674b7f10105d977ee
URL: http://cgit.haiku-os.org/haiku/commit/?id=692fe5550319
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Sun Nov 27 18:49:08 2016 UTC
libdebugger: Add initial version of network interface.
NetworkTargetHostInterface{Info}:
- Barebones classes for implementing a target host interface over TCP.
----------------------------------------------------------------------------
diff --git a/src/kits/debugger/Jamfile b/src/kits/debugger/Jamfile
index 36f0956..eb7113a 100644
--- a/src/kits/debugger/Jamfile
+++ b/src/kits/debugger/Jamfile
@@ -59,6 +59,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) source_language
c_family ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) source_language x86 ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) target_host_interface ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) target_host_interface local ] ;
+SEARCH_SOURCE += [ FDirName $(SUBDIR) target_host_interface network ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) types ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface util ] ;
@@ -266,6 +267,10 @@ local sources =
LocalTargetHostInterface.cpp
LocalTargetHostInterfaceInfo.cpp
+ # target_host_interface/network
+ NetworkTargetHostInterface.cpp
+ NetworkTargetHostInterfaceInfo.cpp
+
# types
ArrayIndexPath.cpp
TargetAddressRangeList.cpp
diff --git
a/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp
b/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp
index 460e3b4..f96076a 100644
--- a/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp
+++ b/src/kits/debugger/target_host_interface/TargetHostInterfaceRoster.cpp
@@ -10,6 +10,7 @@
#include <AutoLocker.h>
#include "LocalTargetHostInterfaceInfo.h"
+#include "NetworkTargetHostInterfaceInfo.h"
#include "TargetHostInterfaceInfo.h"
@@ -100,6 +101,7 @@ TargetHostInterfaceRoster::RegisterInterfaceInfos()
interfaceReference.Detach();
REGISTER_INTERFACE_INFO(Local)
+ REGISTER_INTERFACE_INFO(Network)
return B_OK;
}
diff --git
a/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.cpp
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.cpp
new file mode 100644
index 0000000..021b505
--- /dev/null
+++
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.cpp
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2016, Ingo Weinhold, ingo_weinhold@xxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+
+#include "NetworkTargetHostInterface.h"
+
+#include <AutoDeleter.h>
+#include <AutoLocker.h>
+#include <system_info.h>
+#include <util/KMessage.h>
+
+#include "debug_utils.h"
+
+#include "TargetHost.h"
+
+
+NetworkTargetHostInterface::NetworkTargetHostInterface()
+ :
+ TargetHostInterface()
+{
+ SetName("Network");
+}
+
+
+NetworkTargetHostInterface::~NetworkTargetHostInterface()
+{
+ Close();
+
+ if (fTargetHost != NULL)
+ fTargetHost->ReleaseReference();
+}
+
+
+status_t
+NetworkTargetHostInterface::Init(Settings* settings)
+{
+ return B_NOT_SUPPORTED;
+}
+
+
+void
+NetworkTargetHostInterface::Close()
+{
+}
+
+
+bool
+NetworkTargetHostInterface::IsLocal() const
+{
+ return false;
+}
+
+
+bool
+NetworkTargetHostInterface::Connected() const
+{
+ return false;
+}
+
+
+TargetHost*
+NetworkTargetHostInterface::GetTargetHost()
+{
+ return fTargetHost;
+}
+
+
+status_t
+NetworkTargetHostInterface::Attach(team_id teamID, thread_id threadID,
+ DebuggerInterface*& _interface) const
+{
+ return B_NOT_SUPPORTED;
+}
+
+
+status_t
+NetworkTargetHostInterface::CreateTeam(int commandLineArgc,
+ const char* const* arguments, team_id& _teamID) const
+{
+ return B_NOT_SUPPORTED;
+}
+
+
+status_t
+NetworkTargetHostInterface::LoadCore(const char* coreFilePath,
+ DebuggerInterface*& _interface, thread_id& _thread) const
+{
+ return B_NOT_SUPPORTED;
+}
+
+
+status_t
+NetworkTargetHostInterface::FindTeamByThread(thread_id thread,
+ team_id& _teamID) const
+{
+ return B_NOT_SUPPORTED;
+}
diff --git
a/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.h
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.h
new file mode 100644
index 0000000..eccfe76
--- /dev/null
+++
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterface.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef NETWORK_TARGET_HOST_INTERFACE_H
+#define NETWORK_TARGET_HOST_INTERFACE_H
+
+#include "TargetHostInterface.h"
+
+
+class NetworkTargetHostInterface : public TargetHostInterface {
+public:
+
NetworkTargetHostInterface();
+ virtual
~NetworkTargetHostInterface();
+
+ virtual status_t Init(Settings* settings);
+ virtual void Close();
+
+ virtual bool IsLocal() const;
+ virtual bool Connected() const;
+
+ virtual TargetHost* GetTargetHost();
+
+ virtual status_t Attach(team_id id, thread_id
threadID,
+
DebuggerInterface*& _interface) const;
+ virtual status_t CreateTeam(int commandLineArgc,
+ const
char* const* arguments,
+
team_id& _teamID) const;
+ virtual status_t LoadCore(const char*
coreFilePath,
+
DebuggerInterface*& _interface,
+
thread_id& _thread) const;
+
+ virtual status_t FindTeamByThread(thread_id
thread,
+
team_id& _teamID) const;
+
+private:
+ TargetHost* fTargetHost;
+};
+
+#endif // NETWORK_TARGET_HOST_INTERFACE_H
diff --git
a/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.cpp
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.cpp
new file mode 100644
index 0000000..30d30c3
--- /dev/null
+++
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.cpp
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#include "NetworkTargetHostInterfaceInfo.h"
+
+#include <AutoDeleter.h>
+
+#include "NetworkTargetHostInterface.h"
+#include "SettingsDescription.h"
+#include "Setting.h"
+
+
+static const char* kHostnameSetting = "hostname";
+static const char* kPortSetting = "port";
+
+
+NetworkTargetHostInterfaceInfo::NetworkTargetHostInterfaceInfo()
+ :
+ TargetHostInterfaceInfo("Network"),
+ fDescription(NULL)
+{
+}
+
+
+NetworkTargetHostInterfaceInfo::~NetworkTargetHostInterfaceInfo()
+{
+ delete fDescription;
+}
+
+
+status_t
+NetworkTargetHostInterfaceInfo::Init()
+{
+ fDescription = new(std::nothrow) SettingsDescription;
+ if (fDescription == NULL)
+ return B_NO_MEMORY;
+
+ Setting* setting = new(std::nothrow) StringSettingImpl(kHostnameSetting,
+ "Hostname", "");
+ if (setting == NULL)
+ return B_NO_MEMORY;
+ ObjectDeleter<Setting> settingDeleter(setting);
+ if (!fDescription->AddSetting(setting))
+ return B_NO_MEMORY;
+
+ settingDeleter.Detach();
+ setting = new(std::nothrow) BoundedSettingImpl(kPortSetting, "Port",
+ (uint16)0, (uint16)65535, (uint16)8305);
+ if (setting == NULL)
+ return B_NO_MEMORY;
+ if (!fDescription->AddSetting(setting)) {
+ delete setting;
+ return B_NO_MEMORY;
+ }
+
+ return B_OK;
+}
+
+
+bool
+NetworkTargetHostInterfaceInfo::IsLocal() const
+{
+ return false;
+}
+
+
+bool
+NetworkTargetHostInterfaceInfo::IsConfigured(Settings* settings) const
+{
+ return true;
+}
+
+
+SettingsDescription*
+NetworkTargetHostInterfaceInfo::GetSettingsDescription() const
+{
+ return fDescription;
+}
+
+
+status_t
+NetworkTargetHostInterfaceInfo::CreateInterface(Settings* settings,
+ TargetHostInterface*& _interface) const
+{
+ NetworkTargetHostInterface* interface
+ = new(std::nothrow) NetworkTargetHostInterface;
+ if (interface == NULL)
+ return B_NO_MEMORY;
+
+ status_t error = interface->Init(settings);
+ if (error != B_OK) {
+ delete interface;
+ return error;
+ }
+
+ _interface = interface;
+ return B_OK;
+}
+
diff --git
a/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.h
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.h
new file mode 100644
index 0000000..e3c7a5d
--- /dev/null
+++
b/src/kits/debugger/target_host_interface/network/NetworkTargetHostInterfaceInfo.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef NETWORK_TARGET_HOST_INTERFACE_INFO_H
+#define NETWORK_TARGET_HOST_INTERFACE_INFO_H
+
+#include "TargetHostInterfaceInfo.h"
+
+
+class NetworkTargetHostInterfaceInfo : public TargetHostInterfaceInfo {
+public:
+
NetworkTargetHostInterfaceInfo();
+ virtual
~NetworkTargetHostInterfaceInfo();
+
+ virtual status_t Init();
+
+ virtual bool IsLocal() const;
+ virtual bool IsConfigured(Settings*
settings) const;
+ virtual SettingsDescription* GetSettingsDescription() const;
+
+ virtual status_t CreateInterface(Settings*
settings,
+
TargetHostInterface*& _interface) const;
+
+private:
+ BString fName;
+ SettingsDescription* fDescription;
+};
+
+#endif // NETWORK_TARGET_HOST_INTERFACE_INFO_H
############################################################################
Commit: 365840af1c80fd7fd2f761b66001f0b212126724
URL: http://cgit.haiku-os.org/haiku/commit/?id=365840af1c80
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Thu Dec 1 00:46:04 2016 UTC
Debugger: Adjust TeamsWindow for connection selection.
TeamsWindow:
- Add Listener interface for selected target host interface changes.
- Add menu field to display/choose between active host connections.
- Add button to create a new connection (not yet functional).
TeamsListView:
- Implement TeamsWindow Listener interface to decide when to update
the displayed team list.
- Remove unused current team ID.
----------------------------------------------------------------------------
diff --git
a/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.cpp
b/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.cpp
index 029b1ea..39b46a9 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.cpp
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.cpp
@@ -29,6 +29,7 @@
enum {
+ MSG_SELECTED_INTERFACE_CHANGED = 'seic',
MSG_TEAM_ADDED = 'tead',
MSG_TEAM_REMOVED = 'tere',
MSG_TEAM_RENAMED = 'tern'
@@ -271,13 +272,12 @@ TeamRow::_SetTo(TeamInfo* info)
// #pragma mark - TeamsListView
-TeamsListView::TeamsListView(const char* name, team_id currentTeam,
- TargetHostInterface* interface)
+TeamsListView::TeamsListView(const char* name)
:
Inherited(name, B_NAVIGABLE, B_PLAIN_BORDER),
TargetHost::Listener(),
- fCurrentTeam(currentTeam),
- fInterface(interface)
+ TeamsWindow::Listener(),
+ fInterface(NULL)
{
AddColumn(new TeamsColumn("Name", 400, 100, 600,
B_TRUNCATE_BEGINNING), kNameColumn);
@@ -297,10 +297,6 @@ TeamsListView::AttachedToWindow()
{
Inherited::AttachedToWindow();
TeamsColumn::InitTextMargin(ScrollView());
-
- fInterface->GetTargetHost()->AddListener(this);
-
- _InitList();
}
@@ -308,10 +304,7 @@ void
TeamsListView::DetachedFromWindow()
{
Inherited::DetachedFromWindow();
-
- fInterface->GetTargetHost()->RemoveListener(this);
-
- Clear();
+ _SetInterface(NULL);
}
@@ -319,6 +312,16 @@ void
TeamsListView::MessageReceived(BMessage* message)
{
switch (message->what) {
+ case MSG_SELECTED_INTERFACE_CHANGED:
+ {
+ TargetHostInterface* interface;
+ if (message->FindPointer("interface",
reinterpret_cast<void**>(
+ &interface)) == B_OK) {
+ _SetInterface(interface);
+ }
+ break;
+ }
+
case MSG_TEAM_ADDED:
{
TeamInfo* info;
@@ -421,6 +424,15 @@ TeamsListView::TeamRenamed(TeamInfo* info)
void
+TeamsListView::SelectedInterfaceChanged(TargetHostInterface* interface)
+{
+ BMessage message(MSG_SELECTED_INTERFACE_CHANGED);
+ message.AddPointer("interface", interface);
+ BMessenger(this).SendMessage(&message);
+}
+
+
+void
TeamsListView::_InitList()
{
TargetHost* host = fInterface->GetTargetHost();
@@ -431,3 +443,23 @@ TeamsListView::_InitList()
AddRow(row);
}
}
+
+
+void
+TeamsListView::_SetInterface(TargetHostInterface* interface)
+{
+ if (interface == fInterface)
+ return;
+
+ if (fInterface != NULL) {
+ Clear();
+ fInterface->GetTargetHost()->RemoveListener(this);
+ }
+
+ fInterface = interface;
+ if (fInterface == NULL)
+ return;
+
+ fInterface->GetTargetHost()->AddListener(this);
+ _InitList();
+}
diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.h
b/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.h
index c42a2b0..73d8e0b 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.h
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsListView.h
@@ -15,6 +15,7 @@
#include "TargetHost.h"
#include "TeamInfo.h"
+#include "TeamsWindow.h"
class BBitmap;
@@ -89,12 +90,11 @@ private:
};
-class TeamsListView : public BColumnListView, public TargetHost::Listener {
+class TeamsListView : public BColumnListView, public TargetHost::Listener,
+ public TeamsWindow::Listener {
typedef BColumnListView Inherited;
public:
-
TeamsListView(const char* name,
- team_id
currentTeam,
-
TargetHostInterface* interface);
+
TeamsListView(const char* name);
virtual ~TeamsListView();
TeamRow* FindTeamRow(team_id
teamId);
@@ -104,6 +104,10 @@ public:
virtual void TeamRemoved(team_id team);
virtual void TeamRenamed(TeamInfo* info);
+ // TeamsWindow::Listener
+ virtual void SelectedInterfaceChanged(
+
TargetHostInterface* interface);
+
protected:
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
@@ -112,9 +116,9 @@ protected:
private:
void _InitList();
+ void
_SetInterface(TargetHostInterface* interface);
private:
- team_id fCurrentTeam;
TargetHostInterface* fInterface;
};
diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
index 6a5ee11..851226d 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
@@ -19,10 +19,15 @@
#include <FindDirectory.h>
#include <LayoutBuilder.h>
#include <ListView.h>
+#include <Menu.h>
+#include <MenuField.h>
#include <Path.h>
#include <Screen.h>
#include <ScrollView.h>
+#include <AutoDeleter.h>
+#include <AutoLocker.h>
+
#include "MessageCodes.h"
#include "SettingsManager.h"
#include "TargetHostInterface.h"
@@ -32,7 +37,9 @@
enum {
MSG_TEAM_SELECTION_CHANGED = 'tesc',
- MSG_CHOSE_CORE_FILE = 'chcf'
+ MSG_CHOSE_CORE_FILE = 'chcf',
+ MSG_SWITCH_TARGET_CONNECTION = 'stco',
+ MSG_CREATE_NEW_CONNECTION = 'cnco'
};
@@ -45,6 +52,7 @@ TeamsWindow::TeamsWindow(SettingsManager* settingsManager)
fAttachTeamButton(NULL),
fCreateTeamButton(NULL),
fLoadCoreButton(NULL),
+ fConnectionField(NULL),
fCoreSelectionPanel(NULL),
fSettingsManager(settingsManager)
{
@@ -165,6 +173,27 @@ TeamsWindow::MessageReceived(BMessage* message)
break;
}
+ case MSG_CREATE_NEW_CONNECTION:
+ {
+ break;
+ }
+
+ case MSG_SWITCH_TARGET_CONNECTION:
+ {
+ TargetHostInterface* interface;
+ if (message->FindPointer("interface",
reinterpret_cast<void**>(
+ &interface)) != B_OK) {
+ break;
+ }
+
+ if (interface == fTargetHostInterface)
+ break;
+
+ fTargetHostInterface = interface;
+ _NotifySelectedInterfaceChanged(interface);
+ break;
+ }
+
default:
BWindow::MessageReceived(message);
break;
@@ -182,6 +211,22 @@ TeamsWindow::QuitRequested()
}
+void
+TeamsWindow::AddListener(Listener* listener)
+{
+ AutoLocker<TeamsWindow> locker(this);
+ fListeners.Add(listener);
+}
+
+
+void
+TeamsWindow::RemoveListener(Listener* listener)
+{
+ AutoLocker<TeamsWindow> locker(this);
+ fListeners.Remove(listener);
+}
+
+
// #pragma mark --
@@ -191,23 +236,49 @@ TeamsWindow::_Init()
BMessage settings;
_LoadSettings(settings);
- fTargetHostInterface = TargetHostInterfaceRoster::Default()
- ->ActiveInterfaceAt(0);
-
BRect frame;
if (settings.FindRect("teams window frame", &frame) == B_OK) {
MoveTo(frame.LeftTop());
ResizeTo(frame.Width(), frame.Height());
}
+ BMenu* connectionMenu = new BMenu("Connection");
+ ObjectDeleter<BMenu> menuDeleter(connectionMenu);
+ connectionMenu->SetLabelFromMarked(true);
+
+ TargetHostInterfaceRoster* roster =
TargetHostInterfaceRoster::Default();
+ for (int32 i = 0; i < roster->CountActiveInterfaces(); i++) {
+ TargetHostInterface* interface = roster->ActiveInterfaceAt(i);
+ BMenuItem* item = new
BMenuItem(interface->GetTargetHost()->Name(),
+ new BMessage(MSG_SWITCH_TARGET_CONNECTION));
+ if (item->Message()->AddPointer("interface", interface) !=
B_OK) {
+ delete item;
+ throw std::bad_alloc();
+ }
+
+ if (interface->IsLocal()) {
+ item->SetMarked(true);
+ fTargetHostInterface = interface;
+ }
+
+ connectionMenu->AddItem(item);
+ }
+
BLayoutBuilder::Group<>(this, B_VERTICAL)
- .Add(fTeamsListView = new TeamsListView("TeamsList",
fCurrentTeam,
- fTargetHostInterface))
+ .AddGroup(B_HORIZONTAL)
+ .SetInsets(B_USE_DEFAULT_SPACING)
+ .Add(fConnectionField = new BMenuField("Connected to:",
+ connectionMenu))
+ .AddGlue()
+ .Add(fCreateConnectionButton = new BButton("Create new
connection"
+ B_UTF8_ELLIPSIS, new
BMessage(MSG_CREATE_NEW_CONNECTION)))
+ .End()
+ .Add(fTeamsListView = new TeamsListView("TeamsList"))
.SetInsets(1.0f, 1.0f, 1.0f, 5.0f)
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.Add(fAttachTeamButton = new BButton("Attach", new
BMessage(
- MSG_DEBUG_THIS_TEAM)))
+ MSG_DEBUG_THIS_TEAM)))
.AddGlue()
.Add(fCreateTeamButton = new BButton("Start new team"
B_UTF8_ELLIPSIS, new
BMessage(MSG_SHOW_START_TEAM_WINDOW)))
@@ -216,13 +287,22 @@ TeamsWindow::_Init()
.End()
.End();
+ menuDeleter.Detach();
+
+ AddListener(fTeamsListView);
+
+ connectionMenu->SetTargetForItems(this);
+
fTeamsListView->SetInvocationMessage(new BMessage(MSG_DEBUG_THIS_TEAM));
fTeamsListView->SetSelectionMessage(new BMessage(
MSG_TEAM_SELECTION_CHANGED));
+ fCreateConnectionButton->SetEnabled(true);
fAttachTeamButton->SetEnabled(false);
fCreateTeamButton->SetTarget(this);
fLoadCoreButton->SetTarget(this);
+
+ _NotifySelectedInterfaceChanged(fTargetHostInterface);
}
@@ -271,3 +351,21 @@ TeamsWindow::_SaveSettings()
return status;
}
+
+
+void
+TeamsWindow::_NotifySelectedInterfaceChanged(TargetHostInterface* interface)
+{
+ for (ListenerList::Iterator it = fListeners.GetIterator();
+ Listener* listener = it.Next();) {
+ listener->SelectedInterfaceChanged(interface);
+ }
+}
+
+
+// #pragma mark - TeamsWindow::Listener
+
+
+TeamsWindow::Listener::~Listener()
+{
+}
diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h
b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h
index e124d18..f84bdf2 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h
@@ -9,17 +9,24 @@
#include <Window.h>
+#include <util/DoublyLinkedList.h>
+
+
class BButton;
class BListView;
class BFile;
class BFilePanel;
+class BMenuField;
class BMessage;
class SettingsManager;
class TargetHostInterface;
class TeamsListView;
+
class TeamsWindow : public BWindow {
public:
+ class Listener;
+
TeamsWindow(SettingsManager* settingsManager);
virtual ~TeamsWindow();
@@ -30,22 +37,43 @@ public:
virtual void MessageReceived(BMessage*
message);
virtual bool QuitRequested();
+ void AddListener(Listener*
listener);
+ void
RemoveListener(Listener* listener);
+
+private:
+ typedef DoublyLinkedList<Listener> ListenerList;
+
private:
void _Init();
status_t _OpenSettings(BFile&
file, uint32 mode);
status_t _LoadSettings(BMessage&
settings);
status_t _SaveSettings();
+ void
_NotifySelectedInterfaceChanged(
+
TargetHostInterface* interface);
+
private:
team_id fCurrentTeam;
TargetHostInterface* fTargetHostInterface;
TeamsListView* fTeamsListView;
BButton* fAttachTeamButton;
BButton* fCreateTeamButton;
+ BButton* fCreateConnectionButton;
BButton* fLoadCoreButton;
+ BMenuField* fConnectionField;
BFilePanel* fCoreSelectionPanel;
SettingsManager* fSettingsManager;
+ ListenerList fListeners;
+};
+
+
+class TeamsWindow::Listener : public DoublyLinkedListLinkImpl<Listener>
+{
+public:
+ virtual ~Listener();
+ virtual void SelectedInterfaceChanged(
+
TargetHostInterface* interface) = 0;
};
############################################################################
Commit: 918f4a07330949172df034e8b4251f0a54df0a88
URL: http://cgit.haiku-os.org/haiku/commit/?id=918f4a073309
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Thu Dec 1 02:30:02 2016 UTC
Debugger: StartTeamWindow Style fix.
----------------------------------------------------------------------------
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
index 6f1b684..ac3bb97 100644
--- a/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
@@ -62,6 +62,7 @@ StartTeamWindow::Create(TargetHostInterface* hostInterface)
}
+
void
StartTeamWindow::_Init()
{
@@ -96,6 +97,7 @@ StartTeamWindow::_Init()
fCancelButton->SetTarget(this);
}
+
void
StartTeamWindow::Show()
{
@@ -103,6 +105,7 @@ StartTeamWindow::Show()
BWindow::Show();
}
+
void
StartTeamWindow::MessageReceived(BMessage* message)
{
############################################################################
Commit: 10ba334855ad0d7297e23f15dea292f7dbdd231c
URL: http://cgit.haiku-os.org/haiku/commit/?id=10ba334855ad
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Thu Dec 1 03:18:26 2016 UTC
Debugger: Cleanup.
- Split MessageCodes.h into a second file that separates out the
application-specific message codes from those used by the core.
Adjust includes accordingly. No functional change.
----------------------------------------------------------------------------
diff --git a/headers/private/debugger/MessageCodes.h
b/headers/private/debugger/MessageCodes.h
index b7b62dc..5a22f1f 100644
--- a/headers/private/debugger/MessageCodes.h
+++ b/headers/private/debugger/MessageCodes.h
@@ -1,6 +1,6 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
- * Copyright 2013-2015, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2013-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#ifndef MESSAGE_CODES_H
@@ -35,11 +35,7 @@ enum {
MSG_THREAD_STATE_CHANGED =
'tsch',
MSG_THREAD_CPU_STATE_CHANGED = 'tcsc',
MSG_THREAD_STACK_TRACE_CHANGED = 'tstc',
- MSG_STACK_FRAME_VALUE_RETRIEVED = 'sfvr',
MSG_IMAGE_DEBUG_INFO_CHANGED = 'idic',
- MSG_STOP_IMAGE_SETTINGS_CHANGED = 'sisc',
- MSG_STOP_IMAGE_NAME_ADDED =
'sina',
- MSG_STOP_IMAGE_NAME_REMOVED =
'sinr',
MSG_CONSOLE_OUTPUT_RECEIVED =
'core',
MSG_IMAGE_FILE_CHANGED =
'ifch',
MSG_FUNCTION_SOURCE_CODE_CHANGED = 'fnsc',
@@ -49,57 +45,20 @@ enum {
MSG_DEBUGGER_EVENT
= 'dbge',
MSG_LOAD_SETTINGS
= 'ldst',
- MSG_SETTINGS_MENU_IMPL_ITEM_SELECTED = 'smii',
- MSG_SETTINGS_MENU_IMPL_OPTION_ITEM_SELECTED = 'smio',
-
- MSG_TEXTVIEW_AUTOSCROLL =
'tvas',
-
- MSG_VARIABLES_VIEW_CONTEXT_MENU_DONE = 'ctxd',
- MSG_VARIABLES_VIEW_NODE_SETTINGS_CHANGED = 'vvns',
-
MSG_VALUE_NODE_CHANGED =
'vnch',
MSG_VALUE_NODE_CHILDREN_CREATED = 'vncc',
MSG_VALUE_NODE_CHILDREN_DELETED = 'vncd',
MSG_VALUE_NODE_VALUE_CHANGED = 'vnvc',
- MSG_TEAM_DEBUGGER_QUIT =
'dbqt',
- MSG_TEAM_RESTART_REQUESTED =
'trrq',
- MSG_SHOW_TEAMS_WINDOW =
'stew',
- MSG_TEAMS_WINDOW_CLOSED =
'tewc',
- MSG_SHOW_TEAM_SETTINGS_WINDOW = 'stsw',
- MSG_TEAM_SETTINGS_WINDOW_CLOSED = 'tswc',
- MSG_SHOW_BREAKPOINT_EDIT_WINDOW = 'sbew',
- MSG_BREAKPOINT_EDIT_WINDOW_CLOSED = 'bewc',
- MSG_SHOW_SIGNAL_DISPOSITION_EDIT_WINDOW = 'sdew',
- MSG_SIGNAL_DISPOSITION_EDIT_WINDOW_CLOSED = 'sdec',
- MSG_SHOW_START_TEAM_WINDOW =
'sstw',
- MSG_START_TEAM_WINDOW_CLOSED = 'stwc',
- MSG_START_NEW_TEAM
= 'sttt',
- MSG_DEBUG_THIS_TEAM
= 'dbtt',
- MSG_LOAD_CORE_TEAM
= 'lcte',
- MSG_SHOW_INSPECTOR_WINDOW =
'sirw',
- MSG_INSPECTOR_WINDOW_CLOSED =
'irwc',
- MSG_SHOW_EXPRESSION_WINDOW =
'seww',
- MSG_EXPRESSION_WINDOW_CLOSED = 'ewwc',
- MSG_SHOW_EXPRESSION_PROMPT_WINDOW = 'sepw',
- MSG_ADD_NEW_EXPRESSION =
'anex',
- MSG_EXPRESSION_PROMPT_WINDOW_CLOSED = 'epwc',
- MSG_SHOW_VARIABLE_EDIT_WINDOW = 'svew',
- MSG_VARIABLE_EDIT_WINDOW_CLOSED = 'vewc',
MSG_INSPECT_ADDRESS
= 'isad',
MSG_WRITE_TARGET_MEMORY =
'wtam',
MSG_EVALUATE_EXPRESSION =
'evex',
- MSG_EXPRESSION_EVALUATED =
'exev',
- MSG_SHOW_TYPECAST_NODE_PROMPT = 'stnp',
- MSG_TYPECAST_TO_ARRAY =
'stta',
- MSG_TYPECAST_NODE
= 'tyno',
- MSG_SHOW_WATCH_VARIABLE_PROMPT = 'swvp',
- MSG_SHOW_CONTAINER_RANGE_PROMPT = 'scrp',
- MSG_SET_CONTAINER_RANGE =
'chcr',
- MSG_GENERATE_DEBUG_REPORT =
'gdrp',
MSG_WRITE_CORE_FILE
= 'wrcf',
- MSG_WRITE_VARIABLE_VALUE =
'wrvv',
+ MSG_TEAM_DEBUGGER_QUIT =
'dbqt',
+ MSG_TEAM_RESTART_REQUESTED =
'trrq',
+
+ MSG_GENERATE_DEBUG_REPORT =
'gdrp',
MSG_DEBUG_INFO_NEEDS_USER_INPUT = 'dnui',
MSG_USER_INTERFACE_FILE_CHOSEN = 'uifc'
};
diff --git a/src/apps/debugger/AppMessageCodes.h
b/src/apps/debugger/AppMessageCodes.h
new file mode 100644
index 0000000..ec32a86
--- /dev/null
+++ b/src/apps/debugger/AppMessageCodes.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
+ * Copyright 2013-2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef APP_MESSAGE_CODES_H
+#define APP_MESSAGE_CODES_H
+
+
+enum {
+ MSG_SETTINGS_MENU_IMPL_ITEM_SELECTED = 'smii',
+ MSG_SETTINGS_MENU_IMPL_OPTION_ITEM_SELECTED = 'smio',
+
+ MSG_TEXTVIEW_AUTOSCROLL =
'tvas',
+
+ MSG_VARIABLES_VIEW_CONTEXT_MENU_DONE = 'ctxd',
+ MSG_VARIABLES_VIEW_NODE_SETTINGS_CHANGED = 'vvns',
+
+ MSG_STACK_FRAME_VALUE_RETRIEVED = 'sfvr',
+ MSG_STOP_IMAGE_SETTINGS_CHANGED = 'sisc',
+ MSG_STOP_IMAGE_NAME_ADDED =
'sina',
+ MSG_STOP_IMAGE_NAME_REMOVED =
'sinr',
+
+ MSG_SHOW_TEAMS_WINDOW =
'stew',
+ MSG_TEAMS_WINDOW_CLOSED =
'tewc',
+ MSG_SHOW_TEAM_SETTINGS_WINDOW = 'stsw',
+ MSG_TEAM_SETTINGS_WINDOW_CLOSED = 'tswc',
+ MSG_SHOW_CONNECTION_CONFIG_WINDOW = 'sccw',
+ MSG_CONNECTION_CONFIG_WINDOW_CLOSED = 'ccwc',
+ MSG_SHOW_BREAKPOINT_EDIT_WINDOW = 'sbew',
+ MSG_BREAKPOINT_EDIT_WINDOW_CLOSED = 'bewc',
+ MSG_SHOW_SIGNAL_DISPOSITION_EDIT_WINDOW = 'sdew',
+ MSG_SIGNAL_DISPOSITION_EDIT_WINDOW_CLOSED = 'sdec',
+ MSG_SHOW_START_TEAM_WINDOW =
'sstw',
+ MSG_START_TEAM_WINDOW_CLOSED = 'stwc',
+ MSG_START_NEW_TEAM
= 'sttt',
+ MSG_DEBUG_THIS_TEAM
= 'dbtt',
+ MSG_LOAD_CORE_TEAM
= 'lcte',
+ MSG_SHOW_INSPECTOR_WINDOW =
'sirw',
+ MSG_INSPECTOR_WINDOW_CLOSED =
'irwc',
+ MSG_SHOW_EXPRESSION_WINDOW =
'seww',
+ MSG_EXPRESSION_WINDOW_CLOSED = 'ewwc',
+ MSG_SHOW_EXPRESSION_PROMPT_WINDOW = 'sepw',
+ MSG_ADD_NEW_EXPRESSION =
'anex',
+ MSG_EXPRESSION_PROMPT_WINDOW_CLOSED = 'epwc',
+ MSG_SHOW_VARIABLE_EDIT_WINDOW = 'svew',
+ MSG_VARIABLE_EDIT_WINDOW_CLOSED = 'vewc',
+ MSG_EXPRESSION_EVALUATED =
'exev',
+ MSG_SHOW_TYPECAST_NODE_PROMPT = 'stnp',
+ MSG_TYPECAST_TO_ARRAY =
'stta',
+ MSG_TYPECAST_NODE
= 'tyno',
+ MSG_SHOW_WATCH_VARIABLE_PROMPT = 'swvp',
+ MSG_SHOW_CONTAINER_RANGE_PROMPT = 'scrp',
+ MSG_SET_CONTAINER_RANGE =
'chcr',
+ MSG_WRITE_VARIABLE_VALUE =
'wrvv',
+};
+
+
+#endif // APP_MESSAGE_CODES_H
diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp
index 903c263..e836059 100644
--- a/src/apps/debugger/Debugger.cpp
+++ b/src/apps/debugger/Debugger.cpp
@@ -22,6 +22,7 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
+#include "AppMessageCodes.h"
#include "CommandLineUserInterface.h"
#include "DebuggerGlobals.h"
#include "DebuggerSettingsManager.h"
diff --git
a/src/apps/debugger/user_interface/gui/expression_eval_window/ExpressionEvaluationWindow.cpp
b/src/apps/debugger/user_interface/gui/expression_eval_window/ExpressionEvaluationWindow.cpp
index e182a34..1ae14f3 100644
---
a/src/apps/debugger/user_interface/gui/expression_eval_window/ExpressionEvaluationWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/expression_eval_window/ExpressionEvaluationWindow.cpp
@@ -13,6 +13,7 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
+#include "AppMessageCodes.h"
#include "CppLanguage.h"
#include "FunctionDebugInfo.h"
#include "FunctionInstance.h"
diff --git
a/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
b/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
index fa68daa..4f43ef9 100644
--- a/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
@@ -17,6 +17,7 @@
#include <StringView.h>
#include <TextControl.h>
+#include "AppMessageCodes.h"
#include "Architecture.h"
#include "CppLanguage.h"
#include "GuiTeamUiSettings.h"
diff --git
a/src/apps/debugger/user_interface/gui/team_settings_window/ImageStopConfigView.cpp
b/src/apps/debugger/user_interface/gui/team_settings_window/ImageStopConfigView.cpp
index d5f554b..1e3d324 100644
---
a/src/apps/debugger/user_interface/gui/team_settings_window/ImageStopConfigView.cpp
+++
b/src/apps/debugger/user_interface/gui/team_settings_window/ImageStopConfigView.cpp
@@ -14,6 +14,7 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
+#include "AppMessageCodes.h"
#include "FunctionInstance.h"
#include "Image.h"
#include "ImageDebugInfo.h"
diff --git
a/src/apps/debugger/user_interface/gui/team_settings_window/SignalsConfigView.cpp
b/src/apps/debugger/user_interface/gui/team_settings_window/SignalsConfigView.cpp
index fef4615..8d5abd7 100644
---
a/src/apps/debugger/user_interface/gui/team_settings_window/SignalsConfigView.cpp
+++
b/src/apps/debugger/user_interface/gui/team_settings_window/SignalsConfigView.cpp
@@ -14,6 +14,7 @@
#include "table/TableColumns.h"
+#include "AppMessageCodes.h"
#include "MessageCodes.h"
#include "SignalDispositionEditWindow.h"
#include "SignalDispositionMenu.h"
diff --git
a/src/apps/debugger/user_interface/gui/team_settings_window/TeamSettingsWindow.cpp
b/src/apps/debugger/user_interface/gui/team_settings_window/TeamSettingsWindow.cpp
index f68031d..ec2696c 100644
---
a/src/apps/debugger/user_interface/gui/team_settings_window/TeamSettingsWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/team_settings_window/TeamSettingsWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2015, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2013-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#include "TeamSettingsWindow.h"
@@ -8,9 +8,9 @@
#include <LayoutBuilder.h>
#include <TabView.h>
+#include "AppMessageCodes.h"
#include "ExceptionStopConfigView.h"
#include "ImageStopConfigView.h"
-#include "MessageCodes.h"
#include "SignalsConfigView.h"
diff --git
a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp
b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp
index b6088ad..d061ac0 100644
--- a/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/BreakpointsView.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
- * Copyright 2011-2015, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2011-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
@@ -16,6 +16,7 @@
#include <AutoLocker.h>
#include <ObjectList.h>
+#include "AppMessageCodes.h"
#include "MessageCodes.h"
#include "Team.h"
#include "UserBreakpoint.h"
diff --git a/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp
b/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp
index fea36d8..d66faff 100644
--- a/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@xxxxxx.
- * Copyright 2011-2015, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2011-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
@@ -17,11 +17,11 @@
#include "table/TableColumns.h"
+#include "AppMessageCodes.h"
#include "Architecture.h"
#include "AutoDeleter.h"
#include "CpuState.h"
#include "GuiSettingsUtils.h"
-#include "MessageCodes.h"
#include "Register.h"
#include "UiUtils.h"
diff --git a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
index 98e90e7..ee30aae 100644
--- a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
@@ -31,6 +31,7 @@
#include <AutoLocker.h>
#include <ObjectList.h>
+#include "AppMessageCodes.h"
#include "AutoDeleter.h"
#include "Breakpoint.h"
#include "DisassembledCode.h"
diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp
b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp
index f589869..486307e 100644
--- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp
@@ -33,6 +33,7 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
+#include "AppMessageCodes.h"
#include "Breakpoint.h"
#include "BreakpointEditWindow.h"
#include "ConsoleOutputView.h"
diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
index 4b4065b..1fc7b75 100644
--- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp
@@ -24,6 +24,7 @@
#include "table/TableColumns.h"
#include "ActionMenuItem.h"
+#include "AppMessageCodes.h"
#include "Architecture.h"
#include "ExpressionInfo.h"
#include "ExpressionValues.h"
diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
index 851226d..b0c5b62 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
@@ -28,7 +28,7 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
#include "SettingsManager.h"
#include "TargetHostInterface.h"
#include "TargetHostInterfaceRoster.h"
diff --git a/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp
b/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp
index 70e33ab..8977e5c 100644
--- a/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp
+++ b/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp
@@ -13,7 +13,7 @@
#include <AutoDeleter.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
#include "SettingsDescription.h"
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/BreakpointEditWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/BreakpointEditWindow.cpp
index a5f5abe..5add321 100644
---
a/src/apps/debugger/user_interface/gui/utility_windows/BreakpointEditWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/utility_windows/BreakpointEditWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2014, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2014-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#include "BreakpointEditWindow.h"
@@ -13,10 +13,10 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
+#include "Team.h"
#include "UserBreakpoint.h"
#include "UserInterface.h"
-#include "Team.h"
enum {
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
index 69f55c9..5540817 100644
---
a/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/utility_windows/ExpressionPromptWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2014, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2014-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#include "ExpressionPromptWindow.h"
@@ -9,7 +9,7 @@
#include <String.h>
#include <TextControl.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
ExpressionPromptWindow::ExpressionPromptWindow(BHandler* addTarget,
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/SignalDispositionEditWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/SignalDispositionEditWindow.cpp
index 813891f..acf9bde 100644
---
a/src/apps/debugger/user_interface/gui/utility_windows/SignalDispositionEditWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/utility_windows/SignalDispositionEditWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2015, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2015-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#include "SignalDispositionEditWindow.h"
@@ -13,12 +13,12 @@
#include <AutoDeleter.h>
#include <AutoLocker.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
#include "SignalDispositionMenu.h"
#include "SignalDispositionTypes.h"
+#include "Team.h"
#include "UiUtils.h"
#include "UserInterface.h"
-#include "Team.h"
enum {
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
index ac3bb97..4d2172e 100644
--- a/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/utility_windows/StartTeamWindow.cpp
@@ -14,7 +14,7 @@
#include <StringView.h>
#include <TextControl.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
#include "UserInterface.h"
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/VariableEditWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/VariableEditWindow.cpp
index da4f962..42312dc 100644
---
a/src/apps/debugger/user_interface/gui/utility_windows/VariableEditWindow.cpp
+++
b/src/apps/debugger/user_interface/gui/utility_windows/VariableEditWindow.cpp
@@ -9,7 +9,7 @@
#include <String.h>
#include <StringView.h>
-#include "MessageCodes.h"
+#include "AppMessageCodes.h"
#include "TableCellValueEditor.h"
#include "Value.h"
#include "ValueNode.h"
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/WatchPromptWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/WatchPromptWindow.cpp
index 2523fa5..de15fbd 100644
--- a/src/apps/debugger/user_interface/gui/utility_windows/WatchPromptWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/utility_windows/WatchPromptWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2014, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2012-2016, Rene Gollent, rene@xxxxxxxxxxx.
* Distributed under the terms of the MIT License.
*/
#include "WatchPromptWindow.h"
@@ -15,6 +15,7 @@
#include "AutoLocker.h"
+#include "AppMessageCodes.h"
#include "Architecture.h"
#include "CppLanguage.h"
#include "IntegerValue.h"
############################################################################
Commit: c521fed0dae63e996a8c79459a6d9a8abbea606a
URL: http://cgit.haiku-os.org/haiku/commit/?id=c521fed0dae6
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Fri Dec 2 03:09:53 2016 UTC
Debugger: Add connection configuration window.
ConnectionConfigWindow:
- Utility window that is spawned in response to requests to create a new
remote host connection. Allows setting up and attempting to make a
connection.
----------------------------------------------------------------------------
diff --git a/src/apps/debugger/Jamfile b/src/apps/debugger/Jamfile
index fed5599..e7cb812 100644
--- a/src/apps/debugger/Jamfile
+++ b/src/apps/debugger/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src apps debugger ;
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
-UsePrivateHeaders debugger ;
+UsePrivateHeaders debugger ;
UsePrivateHeaders [ FDirName debugger arch ] ;
UsePrivateHeaders [ FDirName debugger controllers ] ;
UsePrivateHeaders [ FDirName debugger debug_info ] ;
@@ -132,6 +132,7 @@ local sources =
# user_interface/gui/utility_windows
BreakpointEditWindow.cpp
+ ConnectionConfigWindow.cpp
ExpressionPromptWindow.cpp
SignalDispositionEditWindow.cpp
StartTeamWindow.cpp
@@ -165,7 +166,7 @@ local sources =
ReportUserInterface.cpp
;
-Includes [ FGristFiles $(sources) ] :
+Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute ncurses : headers ]
[ BuildFeatureAttribute libedit : headers ]
;
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.cpp
b/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.cpp
new file mode 100644
index 0000000..3abba13
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.cpp
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#include "ConnectionConfigWindow.h"
+
+#include <Application.h>
+#include <Button.h>
+#include <GroupView.h>
+#include <MenuField.h>
+#include <LayoutBuilder.h>
+
+#include <AutoLocker.h>
+
+#include "AppMessageCodes.h"
+#include "TargetHostInterfaceInfo.h"
+#include "TargetHostInterfaceRoster.h"
+#include "TargetHostInterface.h"
+
+
+enum {
+ MSG_SWITCH_CONNECTION_TYPE = 'swct',
+ MSG_CREATE_CONNECTION = 'crco'
+};
+
+
+ConnectionConfigWindow::ConnectionConfigWindow()
+ :
+ BWindow(BRect(), "Create new connection", B_TITLED_WINDOW,
+ B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
+ fConnectionTypeField(NULL),
+ fConfigGroupView(NULL),
+ fCloseButton(NULL),
+ fConnectButton(NULL)
+{
+}
+
+
+ConnectionConfigWindow::~ConnectionConfigWindow()
+{
+}
+
+
+ConnectionConfigWindow*
+ConnectionConfigWindow::Create()
+{
+ ConnectionConfigWindow* self = new ConnectionConfigWindow();
+
+ try {
+ self->_Init();
+ } catch (...) {
+ delete self;
+ throw;
+ }
+
+ return self;
+
+}
+
+
+void
+ConnectionConfigWindow::Show()
+{
+ CenterOnScreen();
+ BWindow::Show();
+}
+
+
+bool
+ConnectionConfigWindow::QuitRequested()
+{
+ return be_app_messenger.SendMessage(MSG_CONNECTION_CONFIG_WINDOW_CLOSED)
+ == B_OK;
+}
+
+
+void
+ConnectionConfigWindow::MessageReceived(BMessage* message)
+{
+ switch (message->what) {
+ default:
+ BWindow::MessageReceived(message);
+ break;
+ }
+
+}
+
+
+void
+ConnectionConfigWindow::_Init()
+{
+ BMenu* menu = _BuildTypeMenu();
+
+ fConfigGroupView = new BGroupView(B_HORIZONTAL);
+
+ BLayoutBuilder::Group<>(this, B_VERTICAL)
+ .SetInsets(B_USE_DEFAULT_SPACING)
+ .Add(fConnectionTypeField = new BMenuField("Type:", menu))
+ .AddGroup(fConfigGroupView)
+ // this group is a placeholder to contain
+ // the actual config view
+ .End()
+ .AddGroup(B_HORIZONTAL)
+ .SetInsets(B_USE_SMALL_SPACING)
+ .AddGlue()
+ .Add(fCloseButton = new BButton("Close",
+ new BMessage(B_QUIT_REQUESTED)))
+ .Add(fConnectButton = new BButton("Connect",
+ new BMessage(MSG_CREATE_CONNECTION)))
+ .End();
+
+ fConnectionTypeField->Menu()->SetLabelFromMarked(true);
+ fConnectionTypeField->Menu()->SetTargetForItems(this);
+
+ fCloseButton->SetTarget(this);
+ fConnectButton->SetTarget(this);
+ fConnectButton->SetEnabled(false);
+
+ if (menu->CountItems() > 0) {
+ BMenuItem* item = menu->ItemAt(0);
+ BMessage* message = item->Message();
+ TargetHostInterfaceInfo* info = NULL;
+ if (message->FindPointer("info",
reinterpret_cast<void**>(&info))
+ == B_OK) {
+ _UpdateActiveConfig(info);
+ menu->ItemAt(0)->SetMarked(true);
+ }
+ }
+}
+
+
+BMenu*
+ConnectionConfigWindow::_BuildTypeMenu()
+{
+ BMenu* menu = new BMenu("Types");
+ TargetHostInterfaceRoster* roster =
TargetHostInterfaceRoster::Default();
+
+ AutoLocker<TargetHostInterfaceRoster> rosterLocker(roster);
+
+ for (int32 i = 0; i < roster->CountInterfaceInfos(); i++) {
+ TargetHostInterfaceInfo* info = roster->InterfaceInfoAt(i);
+ if (info->IsLocal())
+ continue;
+
+ BMenuItem* item = new BMenuItem(info->Name(), new BMessage(
+ MSG_SWITCH_CONNECTION_TYPE));
+ item->Message()->AddPointer("info", info);
+ menu->AddItem(item);
+ }
+
+ return menu;
+}
+
+
+void
+ConnectionConfigWindow::_UpdateActiveConfig(TargetHostInterfaceInfo* info)
+{
+ if (fConfigGroupView->CountChildren() > 0) {
+ BView* view = fConfigGroupView->ChildAt(0);
+ fConfigGroupView->RemoveChild(view);
+ delete view;
+ }
+
+
+}
diff --git
a/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.h
b/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.h
new file mode 100644
index 0000000..3acce80
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/utility_windows/ConnectionConfigWindow.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef CONNECTION_CONFIG_WINDOW_H
+#define CONNECTION_CONFIG_WINDOW_H
+
+
+#include <Window.h>
+
+
+class BButton;
+class BGroupView;
+class BMenu;
+class BMenuField;
+class TargetHostInterfaceInfo;
+
+
+class ConnectionConfigWindow : public BWindow
+{
+public:
+
ConnectionConfigWindow();
+
+
~ConnectionConfigWindow();
+
+ static ConnectionConfigWindow* Create();
+ //
throws
+
+
+ virtual void MessageReceived(BMessage*
message);
+
+ virtual void Show();
+
+ virtual bool QuitRequested();
+
+private:
+ void _Init();
+ BMenu* _BuildTypeMenu();
+ void _UpdateActiveConfig(
+
TargetHostInterfaceInfo* info);
+
+private:
+ BMenuField* fConnectionTypeField;
+ BGroupView* fConfigGroupView;
+ BButton* fCloseButton;
+ BButton* fConnectButton;
+};
+
+#endif // CONNECTION_CONFIG_WINDOW_H
############################################################################
Commit: c4b2191889cbc78bfa8a83925aaf2dbe5ee1f4fc
URL: http://cgit.haiku-os.org/haiku/commit/?id=c4b2191889cb
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Fri Dec 2 03:18:28 2016 UTC
Debugger: Fix incorrect indentation.
----------------------------------------------------------------------------
diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp
index e836059..28e6d9e 100644
--- a/src/apps/debugger/Debugger.cpp
+++ b/src/apps/debugger/Debugger.cpp
@@ -330,19 +330,19 @@ Debugger::MessageReceived(BMessage* message)
switch (message->what) {
case MSG_SHOW_TEAMS_WINDOW:
{
- if (fTeamsWindow) {
- fTeamsWindow->Activate(true);
- break;
- }
+ if (fTeamsWindow) {
+ fTeamsWindow->Activate(true);
+ break;
+ }
- try {
+ try {
fTeamsWindow =
TeamsWindow::Create(&fSettingsManager);
if (fTeamsWindow != NULL)
fTeamsWindow->Show();
- } catch (...) {
+ } catch (...) {
// TODO: Notify the user!
fprintf(stderr, "Error: Failed to create Teams
window\n");
- }
+ }
break;
}
case MSG_TEAMS_WINDOW_CLOSED:
############################################################################
Commit: 445f00371c94ad28924ac5ccadefe72e139aa602
URL: http://cgit.haiku-os.org/haiku/commit/?id=445f00371c94
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Fri Dec 2 03:19:31 2016 UTC
Debugger: Implement spawning connection window.
TeamsWindow:
- Create new connection button now sends a message to the main app,
which manages the connection window as a singleton.
Debugger:
- Handle creating/showing connection configuration window as requested.
----------------------------------------------------------------------------
diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp
index 28e6d9e..dbda3bf 100644
--- a/src/apps/debugger/Debugger.cpp
+++ b/src/apps/debugger/Debugger.cpp
@@ -24,6 +24,7 @@
#include "AppMessageCodes.h"
#include "CommandLineUserInterface.h"
+#include "ConnectionConfigWindow.h"
#include "DebuggerGlobals.h"
#include "DebuggerSettingsManager.h"
#include "DebuggerUiSettingsFactory.h"
@@ -258,6 +259,7 @@ private:
private:
DebuggerSettingsManager fSettingsManager;
+ ConnectionConfigWindow* fConnectionWindow;
TeamsWindow* fTeamsWindow;
StartTeamWindow* fStartTeamWindow;
};
@@ -290,6 +292,7 @@ Debugger::Debugger()
:
BApplication(kDebuggerSignature),
TargetHostInterfaceRoster::Listener(),
+ fConnectionWindow(NULL),
fTeamsWindow(NULL),
fStartTeamWindow(NULL)
{
@@ -377,6 +380,28 @@ Debugger::MessageReceived(BMessage* message)
fStartTeamWindow = NULL;
break;
}
+ case MSG_SHOW_CONNECTION_CONFIG_WINDOW:
+ {
+ if (fConnectionWindow != NULL) {
+ fConnectionWindow->Activate(true);
+ break;
+ }
+
+ try {
+ fConnectionWindow =
ConnectionConfigWindow::Create();
+ if (fConnectionWindow != NULL)
+ fConnectionWindow->Show();
+ } catch (...) {
+ // TODO: Notify the user!
+ fprintf(stderr, "Error: Failed to create Teams
window\n");
+ }
+ break;
+ }
+ case MSG_CONNECTION_CONFIG_WINDOW_CLOSED:
+ {
+ fConnectionWindow = NULL;
+ break;
+ }
case MSG_DEBUG_THIS_TEAM:
{
team_id teamID;
diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
index b0c5b62..613e23b 100644
--- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp
@@ -38,8 +38,7 @@
enum {
MSG_TEAM_SELECTION_CHANGED = 'tesc',
MSG_CHOSE_CORE_FILE = 'chcf',
- MSG_SWITCH_TARGET_CONNECTION = 'stco',
- MSG_CREATE_NEW_CONNECTION = 'cnco'
+ MSG_SWITCH_TARGET_CONNECTION = 'stco'
};
@@ -54,7 +53,8 @@ TeamsWindow::TeamsWindow(SettingsManager* settingsManager)
fLoadCoreButton(NULL),
fConnectionField(NULL),
fCoreSelectionPanel(NULL),
- fSettingsManager(settingsManager)
+ fSettingsManager(settingsManager),
+ fListeners()
{
team_info info;
get_team_info(B_CURRENT_TEAM, &info);
@@ -173,11 +173,6 @@ TeamsWindow::MessageReceived(BMessage* message)
break;
}
- case MSG_CREATE_NEW_CONNECTION:
- {
- break;
- }
-
case MSG_SWITCH_TARGET_CONNECTION:
{
TargetHostInterface* interface;
@@ -191,6 +186,7 @@ TeamsWindow::MessageReceived(BMessage* message)
fTargetHostInterface = interface;
_NotifySelectedInterfaceChanged(interface);
+
fLoadCoreButton->SetEnabled(fTargetHostInterface->IsLocal());
break;
}
@@ -271,7 +267,8 @@ TeamsWindow::_Init()
connectionMenu))
.AddGlue()
.Add(fCreateConnectionButton = new BButton("Create new
connection"
- B_UTF8_ELLIPSIS, new
BMessage(MSG_CREATE_NEW_CONNECTION)))
+ B_UTF8_ELLIPSIS, new BMessage(
+
MSG_SHOW_CONNECTION_CONFIG_WINDOW)))
.End()
.Add(fTeamsListView = new TeamsListView("TeamsList"))
.SetInsets(1.0f, 1.0f, 1.0f, 5.0f)
@@ -297,10 +294,10 @@ TeamsWindow::_Init()
fTeamsListView->SetSelectionMessage(new BMessage(
MSG_TEAM_SELECTION_CHANGED));
- fCreateConnectionButton->SetEnabled(true);
fAttachTeamButton->SetEnabled(false);
fCreateTeamButton->SetTarget(this);
fLoadCoreButton->SetTarget(this);
+ fCreateConnectionButton->SetTarget(be_app);
_NotifySelectedInterfaceChanged(fTargetHostInterface);
}
############################################################################
Commit: eede6646dd548b5fe56d9305f1d6fb2b650e26c3
URL: http://cgit.haiku-os.org/haiku/commit/?id=eede6646dd54
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Sun Dec 4 19:19:42 2016 UTC
Debugger: Add connection config handler framework.
ConnectionConfigHandler:
- Abstract base class for the different types of connection that allows one to
retrieve an appropriate configuration view based on the target host interface
type. This will allow the configuration window to switch dynamically between
network, USB, etc. without having to know the details of any of those.
Initially only a network subclass has been implemented though.
ConnectionConfigHandlerRoster:
- Keeps track of the list of available config handlers, and handles mapping a
request for a given interface info to the appropriate type of handler.
ConnectionConfigView:
- Abstract base class for the actual configuration views returned by the config
handlers. This exposes a listener interface via which the view can notify
an interested party that the configuration has been changed. Correspondingly,
the configuration window will use this to determine if the configuration is
complete enough to allow a connection attempt.
----------------------------------------------------------------------------
diff --git a/src/apps/debugger/Jamfile b/src/apps/debugger/Jamfile
index e7cb812..f218e26 100644
--- a/src/apps/debugger/Jamfile
+++ b/src/apps/debugger/Jamfile
@@ -38,6 +38,9 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) settings ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli commands ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui ] ;
+SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui connection_config ] ;
+SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui connection_config
+ config_handlers ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui
expression_eval_window ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui inspector_window ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface gui model ] ;
@@ -85,6 +88,15 @@ local sources =
# user_interface/gui
GraphicalUserInterface.cpp
+ # user_interface/gui/connection_config
+ ConnectionConfigHandler.cpp
+ ConnectionConfigHandlerRoster.cpp
+ ConnectionConfigView.cpp
+
+ # user_interface/gui/connection_config/config_handlers
+ NetworkConnectionConfigHandler.cpp
+ NetworkConnectionConfigView.cpp
+
# user_interface/gui/model
VariablesViewState.cpp
VariablesViewStateHistory.cpp
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.cpp
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.cpp
new file mode 100644
index 0000000..d6380a8
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#include "ConnectionConfigHandler.h"
+
+
+ConnectionConfigHandler::ConnectionConfigHandler(const char* name)
+ :
+ fName(name)
+{
+}
+
+
+ConnectionConfigHandler::~ConnectionConfigHandler()
+{
+}
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.h
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.h
new file mode 100644
index 0000000..adbb6a8
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandler.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef CONNECTION_CONFIG_HANDLER_H
+#define CONNECTION_CONFIG_HANDLER_H
+
+#include <String.h>
+#include <SupportDefs.h>
+
+#include "ConnectionConfigView.h"
+
+
+class TargetHostInterfaceInfo;
+
+
+class ConnectionConfigHandler {
+public:
+
ConnectionConfigHandler(const char* name);
+ virtual
~ConnectionConfigHandler();
+
+ const BString& Name() const { return fName; }
+
+ virtual status_t
CreateView(TargetHostInterfaceInfo* info,
+
ConnectionConfigView::Listener* listener,
+
ConnectionConfigView*& _view) = 0;
+private:
+ BString fName;
+};
+
+
+#endif // CONNECTION_CONFIG_HANDLER_H
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp
new file mode 100644
index 0000000..fbd2f7a
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.cpp
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#include "ConnectionConfigHandlerRoster.h"
+
+#include <AutoDeleter.h>
+
+#include "NetworkConnectionConfigHandler.h"
+#include "TargetHostInterfaceInfo.h"
+
+
+/*static*/ ConnectionConfigHandlerRoster*
+ ConnectionConfigHandlerRoster::sDefaultInstance = NULL;
+
+
+ConnectionConfigHandlerRoster::ConnectionConfigHandlerRoster()
+ :
+ fLock("config handler roster lock"),
+ fConfigHandlers(10, true)
+{
+}
+
+
+ConnectionConfigHandlerRoster::~ConnectionConfigHandlerRoster()
+{
+}
+
+
+/*static*/ ConnectionConfigHandlerRoster*
+ConnectionConfigHandlerRoster::Default()
+{
+ return sDefaultInstance;
+}
+
+
+/*static*/ status_t
+ConnectionConfigHandlerRoster::CreateDefault()
+{
+ if (sDefaultInstance != NULL)
+ return B_OK;
+
+ ConnectionConfigHandlerRoster* roster
+ = new(std::nothrow) ConnectionConfigHandlerRoster;
+ if (roster == NULL)
+ return B_NO_MEMORY;
+
+ ObjectDeleter<ConnectionConfigHandlerRoster> rosterDeleter(roster);
+
+ status_t error = roster->Init();
+ if (error != B_OK)
+ return error;
+
+ sDefaultInstance = roster;
+ rosterDeleter.Detach();
+ return B_OK;
+}
+
+
+/*static*/ void
+ConnectionConfigHandlerRoster::DeleteDefault()
+{
+ ConnectionConfigHandlerRoster* roster = sDefaultInstance;
+ sDefaultInstance = NULL;
+ delete roster;
+}
+
+
+status_t
+ConnectionConfigHandlerRoster::Init()
+{
+ return _RegisterHandlers();
+}
+
+
+bool
+ConnectionConfigHandlerRoster::HasHandlerFor(TargetHostInterfaceInfo* info)
+ const
+{
+ ConnectionConfigHandler* handler = NULL;
+ return _GetHandler(info->Name(), handler);
+}
+
+
+status_t
+ConnectionConfigHandlerRoster::CreateConfigView(TargetHostInterfaceInfo* info,
+ ConnectionConfigView::Listener* listener,
+ ConnectionConfigView*& _view) const
+{
+ ConnectionConfigHandler* handler = NULL;
+
+ if (!_GetHandler(info->Name(), handler))
+ return B_NOT_SUPPORTED;
+
+ return handler->CreateView(info, listener, _view);
+}
+
+
+bool
+ConnectionConfigHandlerRoster::_GetHandler(const BString& name,
+ ConnectionConfigHandler*& _handler) const
+{
+ ConnectionConfigHandler* handler = NULL;
+ for (int32 i = 0; i < fConfigHandlers.CountItems(); i++) {
+ handler = fConfigHandlers.ItemAt(i);
+ if (handler->Name() == name) {
+ _handler = handler;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+status_t
+ConnectionConfigHandlerRoster::_RegisterHandlers()
+{
+ ConnectionConfigHandler* handler = NULL;
+ ObjectDeleter<ConnectionConfigHandler> handlerDeleter;
+
+ #undef REGISTER_HANDLER_INFO
+ #define REGISTER_HANDLER_INFO(type) \
+ handler = new(std::nothrow) type##ConnectionConfigHandler; \
+ if (handler == NULL) \
+ return B_NO_MEMORY; \
+ handlerDeleter.SetTo(handler); \
+ if (!fConfigHandlers.AddItem(handler)) \
+ return B_NO_MEMORY; \
+ handlerDeleter.Detach(); \
+
+ REGISTER_HANDLER_INFO(Network)
+
+ return B_OK;
+}
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h
new file mode 100644
index 0000000..524ffe7
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigHandlerRoster.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef CONNECTION_CONFIG_HANDLER_ROSTER_H
+#define CONNECTION_CONFIG_HANDLER_ROSTER_H
+
+#include <Locker.h>
+#include <ObjectList.h>
+#include <String.h>
+
+#include "ConnectionConfigView.h"
+
+
+class ConnectionConfigHandler;
+class TargetHostInterfaceInfo;
+
+
+class ConnectionConfigHandlerRoster {
+public:
+
ConnectionConfigHandlerRoster();
+ virtual
~ConnectionConfigHandlerRoster();
+
+ static ConnectionConfigHandlerRoster* Default();
+ static status_t CreateDefault();
+ static void DeleteDefault();
+
+ bool Lock() {
return fLock.Lock(); }
+ void Unlock() {
fLock.Unlock(); }
+
+ status_t Init();
+
+ bool
HasHandlerFor(TargetHostInterfaceInfo* info)
+ const;
+
+ status_t
CreateConfigView(TargetHostInterfaceInfo* info,
+
ConnectionConfigView::Listener* listener,
+
ConnectionConfigView*& _view) const;
+
+private:
+ typedef BObjectList<ConnectionConfigHandler>
HandlerList;
+
+private:
+ bool _GetHandler(const
BString& name,
+
ConnectionConfigHandler*& _handler) const;
+ status_t _RegisterHandlers();
+
+private:
+ BLocker fLock;
+ static ConnectionConfigHandlerRoster* sDefaultInstance;
+
+ HandlerList fConfigHandlers;
+};
+
+#endif // CONNECTION_CONFIG_HANDLER_ROSTER_H
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.cpp
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.cpp
new file mode 100644
index 0000000..b3e220f
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#include "ConnectionConfigView.h"
+
+
+ConnectionConfigView::ConnectionConfigView(const char* name)
+ :
+ BView(name, B_WILL_DRAW)
+{
+}
+
+
+ConnectionConfigView::~ConnectionConfigView()
+{
+}
+
+
+status_t
+ConnectionConfigView::Init(TargetHostInterfaceInfo* info, Listener* listener)
+{
+ fInfo = info;
+ fListener = listener;
+
+ return InitSpecific();
+}
+
+
+void
+ConnectionConfigView::NotifyConfigurationChanged(Settings* settings)
+{
+ fListener->ConfigurationChanged(settings);
+}
+
+
+// #pragma mark - ConnectionConfigView::Listener
+
+
+ConnectionConfigView::Listener::~Listener()
+{
+}
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.h
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.h
new file mode 100644
index 0000000..431a62f
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef CONNECTION_CONFIG_VIEW_H
+#define CONNECTION_CONFIG_VIEW_H
+
+#include <View.h>
+
+
+class Settings;
+class TargetHostInterfaceInfo;
+
+
+class ConnectionConfigView : public BView {
+public:
+ class Listener;
+
ConnectionConfigView(const char* name);
+ virtual ~ConnectionConfigView();
+
+ status_t
Init(TargetHostInterfaceInfo* info,
+
Listener* listener);
+
+protected:
+ TargetHostInterfaceInfo* InterfaceInfo() const
+ {
return fInfo; }
+ void
NotifyConfigurationChanged(Settings* settings);
+
+ virtual status_t InitSpecific() = 0;
+
+private:
+ TargetHostInterfaceInfo* fInfo;
+ Listener* fListener;
+};
+
+
+class ConnectionConfigView::Listener {
+public:
+ virtual ~Listener();
+
+ virtual void ConfigurationChanged(Settings*
settings) = 0;
+};
+
+
+#endif // CONNECTION_CONFIG_VIEW_H
diff --git
a/src/apps/debugger/user_interface/gui/connection_config/config_handlers/NetworkConnectionConfigHandler.cpp
b/src/apps/debugger/user_interface/gui/connection_config/config_handlers/NetworkConnectionConfigHandler.cpp
new file mode 100644
index 0000000..e488f4b
--- /dev/null
+++
b/src/apps/debugger/user_interface/gui/connection_config/config_handlers/NetworkConnectionConfigHandler.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2016, Rene Gollent, rene@xxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
[ *** diff truncated: 200 lines dropped *** ]
############################################################################
Commit: 7e6e3c1be2d23132861902a1f30e507095a9e7dc
URL: http://cgit.haiku-os.org/haiku/commit/?id=7e6e3c1be2d2
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Mon Dec 5 22:59:45 2016 UTC
Debugger: Implement use of connection config roster.
Debugger:
- Initialize/Deinitialize roster as appropriate.
ConnectionConfigWindow:
- Implement config view listener interface, and use roster
to retrieve and add appropriate config view when switching
between interface types.
----------------------------------------------------------------------------
############################################################################
Revision: hrev50738
Commit: e218ec028869b8d4da1a0b7ee6ffa008b3efe748
URL: http://cgit.haiku-os.org/haiku/commit/?id=e218ec028869
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Mon Dec 5 23:08:04 2016 UTC
Debugger: Hide connection controls.
TeamsWindow:
- As the functionality isn't yet actually ready, hide the controls in the
teams window for now.
----------------------------------------------------------------------------