Debugger: Split into core library and application.
- Add subfolder src/kits/debugger which contains the debugger's core functionality and lower layers. Correspondingly add headers/private/debugger for shared headers to be used by clients such as the Debugger application and eventual remote_debug_server. Adjust various files to account for differences as a result of the split and moves. - Add libdebugger.so to minimal Jamfile.
This commit is contained in:
@@ -95,6 +95,7 @@ rule HaikuImageGetSystemLibs
|
||||
libpackage.so
|
||||
libtextencoding.so libtracker.so libtranslation.so
|
||||
] ]
|
||||
libdebugger.so@primary
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ rule HaikuImageGetSystemLibs
|
||||
libscreensaver.so
|
||||
libtextencoding.so libtracker.so libtranslation.so
|
||||
] ]
|
||||
libdebugger.so@primary
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
+12
-5
@@ -10,24 +10,31 @@
|
||||
#include <debugger.h>
|
||||
#include <Looper.h>
|
||||
|
||||
#include <debug_support.h>
|
||||
|
||||
#include "DebugEvent.h"
|
||||
#include "Jobs.h"
|
||||
#include "Team.h"
|
||||
#include "TeamSettings.h"
|
||||
#include "ThreadHandler.h"
|
||||
#include "UserInterface.h"
|
||||
#include "Worker.h"
|
||||
#include "util/Worker.h"
|
||||
|
||||
|
||||
class DebugEvent;
|
||||
class DebuggerInterface;
|
||||
class DebugReportGenerator;
|
||||
class FileManager;
|
||||
class ImageCreatedEvent;
|
||||
class ImageDebugInfoLoadingState;
|
||||
class ImageDeletedEvent;
|
||||
class PostSyscallEvent;
|
||||
class SettingsManager;
|
||||
class TeamDebugInfo;
|
||||
class TeamDeletedEvent;
|
||||
class TeamExecEvent;
|
||||
class TeamMemoryBlockManager;
|
||||
class Thread;
|
||||
class ThreadCreatedEvent;
|
||||
class ThreadDeletedEvent;
|
||||
class ThreadRenamedEvent;
|
||||
class ThreadPriorityChangedEvent;
|
||||
class WatchpointManager;
|
||||
|
||||
|
||||
+13
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copyright 2014, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2014-2016, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef THREAD_HANDLER_H
|
||||
@@ -11,25 +11,32 @@
|
||||
#include <util/OpenHashTable.h>
|
||||
|
||||
#include "Breakpoint.h"
|
||||
#include "DebugEvent.h"
|
||||
#include "ImageDebugInfoProvider.h"
|
||||
#include "Thread.h"
|
||||
#include "model/Thread.h"
|
||||
|
||||
|
||||
class BreakpointHitEvent;
|
||||
class BreakpointManager;
|
||||
class DebugEvent;
|
||||
class DebuggerCallEvent;
|
||||
class DebuggerInterface;
|
||||
class ExceptionOccurredEvent;
|
||||
class ExpressionResult;
|
||||
class ImageDebugInfoJobListener;
|
||||
class JobListener;
|
||||
class SignalReceivedEvent;
|
||||
class SingleStepEvent;
|
||||
class StackFrame;
|
||||
class Statement;
|
||||
class ThreadDebuggedEvent;
|
||||
class WatchpointHitEvent;
|
||||
class Worker;
|
||||
|
||||
|
||||
class ThreadHandler : public BReferenceable, private ImageDebugInfoProvider,
|
||||
private BreakpointClient {
|
||||
public:
|
||||
ThreadHandler(Thread* thread, Worker* worker,
|
||||
ThreadHandler(::Thread* thread, Worker* worker,
|
||||
DebuggerInterface* debuggerInterface,
|
||||
JobListener* listener,
|
||||
BreakpointManager* breakpointManager);
|
||||
@@ -38,7 +45,7 @@ public:
|
||||
void Init();
|
||||
|
||||
thread_id ThreadID() const { return fThread->ID(); }
|
||||
Thread* GetThread() const { return fThread; }
|
||||
::Thread* GetThread() const { return fThread; }
|
||||
|
||||
status_t SetBreakpointAndRun(target_addr_t address);
|
||||
// team lock held
|
||||
@@ -115,7 +122,7 @@ private:
|
||||
const;
|
||||
|
||||
private:
|
||||
Thread* fThread;
|
||||
::Thread* fThread;
|
||||
Worker* fWorker;
|
||||
DebuggerInterface* fDebuggerInterface;
|
||||
JobListener* fJobListener;
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2012-2016, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef VALUE_NODE_MANAGER_H
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
ValueNodeManager(bool addFrameNodes = true);
|
||||
virtual ~ValueNodeManager();
|
||||
|
||||
status_t SetStackFrame(Thread* thread,
|
||||
status_t SetStackFrame(::Thread* thread,
|
||||
StackFrame* frame);
|
||||
|
||||
bool AddListener(
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
bool fAddFrameNodes;
|
||||
ValueNodeContainer* fContainer;
|
||||
StackFrame* fStackFrame;
|
||||
Thread* fThread;
|
||||
::Thread* fThread;
|
||||
ListenerList fListeners;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copyright 2013-2015, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2013-2016, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef TEAM_H
|
||||
@@ -126,12 +126,12 @@ public:
|
||||
const char* Name() const { return fName.String(); }
|
||||
void SetName(const BString& name);
|
||||
|
||||
void AddThread(Thread* thread);
|
||||
void AddThread(::Thread* thread);
|
||||
status_t AddThread(const ThreadInfo& threadInfo,
|
||||
Thread** _thread = NULL);
|
||||
void RemoveThread(Thread* thread);
|
||||
::Thread** _thread = NULL);
|
||||
void RemoveThread(::Thread* thread);
|
||||
bool RemoveThread(thread_id threadID);
|
||||
Thread* ThreadByID(thread_id threadID) const;
|
||||
::Thread* ThreadByID(thread_id threadID) const;
|
||||
const ThreadList& Threads() const;
|
||||
|
||||
status_t AddImage(const ImageInfo& imageInfo,
|
||||
@@ -228,9 +228,10 @@ public:
|
||||
void RemoveListener(Listener* listener);
|
||||
|
||||
// service methods for Thread
|
||||
void NotifyThreadStateChanged(Thread* thread);
|
||||
void NotifyThreadCpuStateChanged(Thread* thread);
|
||||
void NotifyThreadStackTraceChanged(Thread* thread);
|
||||
void NotifyThreadStateChanged(::Thread* thread);
|
||||
void NotifyThreadCpuStateChanged(::Thread* thread);
|
||||
void NotifyThreadStackTraceChanged(
|
||||
::Thread* thread);
|
||||
|
||||
// service methods for Image
|
||||
void NotifyImageDebugInfoChanged(Image* image);
|
||||
@@ -283,8 +284,8 @@ private:
|
||||
|
||||
private:
|
||||
void _NotifyTeamRenamed();
|
||||
void _NotifyThreadAdded(Thread* thread);
|
||||
void _NotifyThreadRemoved(Thread* thread);
|
||||
void _NotifyThreadAdded(::Thread* thread);
|
||||
void _NotifyThreadRemoved(::Thread* thread);
|
||||
void _NotifyImageAdded(Image* image);
|
||||
void _NotifyImageRemoved(Image* image);
|
||||
|
||||
@@ -327,12 +328,12 @@ protected:
|
||||
|
||||
class Team::ThreadEvent : public Event {
|
||||
public:
|
||||
ThreadEvent(uint32 type, Thread* thread);
|
||||
ThreadEvent(uint32 type, ::Thread* thread);
|
||||
|
||||
Thread* GetThread() const { return fThread; }
|
||||
::Thread* GetThread() const { return fThread; }
|
||||
|
||||
protected:
|
||||
Thread* fThread;
|
||||
::Thread* fThread;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2013-2016, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@@ -40,7 +40,8 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
class Thread : public BReferenceable, public DoublyLinkedListLinkImpl<Thread> {
|
||||
class Thread : public BReferenceable,
|
||||
public DoublyLinkedListLinkImpl< ::Thread> {
|
||||
public:
|
||||
Thread(Team* team, thread_id threadID);
|
||||
~Thread();
|
||||
@@ -96,7 +97,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
typedef DoublyLinkedList<Thread> ThreadList;
|
||||
typedef DoublyLinkedList< ::Thread> ThreadList;
|
||||
|
||||
|
||||
#endif // THREAD_H
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <util/DoublyLinkedList.h>
|
||||
|
||||
#include "TeamDebugger.h"
|
||||
#include "controllers/TeamDebugger.h"
|
||||
|
||||
|
||||
class DebuggerInterface;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copyright 2013-2015, Rene Gollent, rene@gollent.com.
|
||||
* Copyright 2013-2016, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef USER_INTERFACE_H
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
SourceLanguage* language,
|
||||
ExpressionInfo* info,
|
||||
StackFrame* frame = NULL,
|
||||
Thread* thread = NULL) = 0;
|
||||
::Thread* thread = NULL) = 0;
|
||||
|
||||
virtual void DebugReportRequested(entry_ref* path) = 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user