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
|
libpackage.so
|
||||||
libtextencoding.so libtracker.so libtranslation.so
|
libtextencoding.so libtracker.so libtranslation.so
|
||||||
] ]
|
] ]
|
||||||
|
libdebugger.so@primary
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ rule HaikuImageGetSystemLibs
|
|||||||
libscreensaver.so
|
libscreensaver.so
|
||||||
libtextencoding.so libtracker.so libtranslation.so
|
libtextencoding.so libtracker.so libtranslation.so
|
||||||
] ]
|
] ]
|
||||||
|
libdebugger.so@primary
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-5
@@ -10,24 +10,31 @@
|
|||||||
#include <debugger.h>
|
#include <debugger.h>
|
||||||
#include <Looper.h>
|
#include <Looper.h>
|
||||||
|
|
||||||
#include <debug_support.h>
|
|
||||||
|
|
||||||
#include "DebugEvent.h"
|
|
||||||
#include "Jobs.h"
|
|
||||||
#include "Team.h"
|
#include "Team.h"
|
||||||
#include "TeamSettings.h"
|
#include "TeamSettings.h"
|
||||||
#include "ThreadHandler.h"
|
#include "ThreadHandler.h"
|
||||||
#include "UserInterface.h"
|
#include "UserInterface.h"
|
||||||
#include "Worker.h"
|
#include "util/Worker.h"
|
||||||
|
|
||||||
|
|
||||||
|
class DebugEvent;
|
||||||
class DebuggerInterface;
|
class DebuggerInterface;
|
||||||
class DebugReportGenerator;
|
class DebugReportGenerator;
|
||||||
class FileManager;
|
class FileManager;
|
||||||
|
class ImageCreatedEvent;
|
||||||
|
class ImageDebugInfoLoadingState;
|
||||||
|
class ImageDeletedEvent;
|
||||||
|
class PostSyscallEvent;
|
||||||
class SettingsManager;
|
class SettingsManager;
|
||||||
class TeamDebugInfo;
|
class TeamDebugInfo;
|
||||||
|
class TeamDeletedEvent;
|
||||||
|
class TeamExecEvent;
|
||||||
class TeamMemoryBlockManager;
|
class TeamMemoryBlockManager;
|
||||||
class Thread;
|
class Thread;
|
||||||
|
class ThreadCreatedEvent;
|
||||||
|
class ThreadDeletedEvent;
|
||||||
|
class ThreadRenamedEvent;
|
||||||
|
class ThreadPriorityChangedEvent;
|
||||||
class WatchpointManager;
|
class WatchpointManager;
|
||||||
|
|
||||||
|
|
||||||
+13
-6
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
* 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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef THREAD_HANDLER_H
|
#ifndef THREAD_HANDLER_H
|
||||||
@@ -11,25 +11,32 @@
|
|||||||
#include <util/OpenHashTable.h>
|
#include <util/OpenHashTable.h>
|
||||||
|
|
||||||
#include "Breakpoint.h"
|
#include "Breakpoint.h"
|
||||||
#include "DebugEvent.h"
|
|
||||||
#include "ImageDebugInfoProvider.h"
|
#include "ImageDebugInfoProvider.h"
|
||||||
#include "Thread.h"
|
#include "model/Thread.h"
|
||||||
|
|
||||||
|
|
||||||
|
class BreakpointHitEvent;
|
||||||
class BreakpointManager;
|
class BreakpointManager;
|
||||||
|
class DebugEvent;
|
||||||
|
class DebuggerCallEvent;
|
||||||
class DebuggerInterface;
|
class DebuggerInterface;
|
||||||
|
class ExceptionOccurredEvent;
|
||||||
class ExpressionResult;
|
class ExpressionResult;
|
||||||
class ImageDebugInfoJobListener;
|
class ImageDebugInfoJobListener;
|
||||||
class JobListener;
|
class JobListener;
|
||||||
|
class SignalReceivedEvent;
|
||||||
|
class SingleStepEvent;
|
||||||
class StackFrame;
|
class StackFrame;
|
||||||
class Statement;
|
class Statement;
|
||||||
|
class ThreadDebuggedEvent;
|
||||||
|
class WatchpointHitEvent;
|
||||||
class Worker;
|
class Worker;
|
||||||
|
|
||||||
|
|
||||||
class ThreadHandler : public BReferenceable, private ImageDebugInfoProvider,
|
class ThreadHandler : public BReferenceable, private ImageDebugInfoProvider,
|
||||||
private BreakpointClient {
|
private BreakpointClient {
|
||||||
public:
|
public:
|
||||||
ThreadHandler(Thread* thread, Worker* worker,
|
ThreadHandler(::Thread* thread, Worker* worker,
|
||||||
DebuggerInterface* debuggerInterface,
|
DebuggerInterface* debuggerInterface,
|
||||||
JobListener* listener,
|
JobListener* listener,
|
||||||
BreakpointManager* breakpointManager);
|
BreakpointManager* breakpointManager);
|
||||||
@@ -38,7 +45,7 @@ public:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
thread_id ThreadID() const { return fThread->ID(); }
|
thread_id ThreadID() const { return fThread->ID(); }
|
||||||
Thread* GetThread() const { return fThread; }
|
::Thread* GetThread() const { return fThread; }
|
||||||
|
|
||||||
status_t SetBreakpointAndRun(target_addr_t address);
|
status_t SetBreakpointAndRun(target_addr_t address);
|
||||||
// team lock held
|
// team lock held
|
||||||
@@ -115,7 +122,7 @@ private:
|
|||||||
const;
|
const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Thread* fThread;
|
::Thread* fThread;
|
||||||
Worker* fWorker;
|
Worker* fWorker;
|
||||||
DebuggerInterface* fDebuggerInterface;
|
DebuggerInterface* fDebuggerInterface;
|
||||||
JobListener* fJobListener;
|
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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef VALUE_NODE_MANAGER_H
|
#ifndef VALUE_NODE_MANAGER_H
|
||||||
@@ -20,7 +20,7 @@ public:
|
|||||||
ValueNodeManager(bool addFrameNodes = true);
|
ValueNodeManager(bool addFrameNodes = true);
|
||||||
virtual ~ValueNodeManager();
|
virtual ~ValueNodeManager();
|
||||||
|
|
||||||
status_t SetStackFrame(Thread* thread,
|
status_t SetStackFrame(::Thread* thread,
|
||||||
StackFrame* frame);
|
StackFrame* frame);
|
||||||
|
|
||||||
bool AddListener(
|
bool AddListener(
|
||||||
@@ -48,7 +48,7 @@ private:
|
|||||||
bool fAddFrameNodes;
|
bool fAddFrameNodes;
|
||||||
ValueNodeContainer* fContainer;
|
ValueNodeContainer* fContainer;
|
||||||
StackFrame* fStackFrame;
|
StackFrame* fStackFrame;
|
||||||
Thread* fThread;
|
::Thread* fThread;
|
||||||
ListenerList fListeners;
|
ListenerList fListeners;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
* 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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef TEAM_H
|
#ifndef TEAM_H
|
||||||
@@ -126,12 +126,12 @@ public:
|
|||||||
const char* Name() const { return fName.String(); }
|
const char* Name() const { return fName.String(); }
|
||||||
void SetName(const BString& name);
|
void SetName(const BString& name);
|
||||||
|
|
||||||
void AddThread(Thread* thread);
|
void AddThread(::Thread* thread);
|
||||||
status_t AddThread(const ThreadInfo& threadInfo,
|
status_t AddThread(const ThreadInfo& threadInfo,
|
||||||
Thread** _thread = NULL);
|
::Thread** _thread = NULL);
|
||||||
void RemoveThread(Thread* thread);
|
void RemoveThread(::Thread* thread);
|
||||||
bool RemoveThread(thread_id threadID);
|
bool RemoveThread(thread_id threadID);
|
||||||
Thread* ThreadByID(thread_id threadID) const;
|
::Thread* ThreadByID(thread_id threadID) const;
|
||||||
const ThreadList& Threads() const;
|
const ThreadList& Threads() const;
|
||||||
|
|
||||||
status_t AddImage(const ImageInfo& imageInfo,
|
status_t AddImage(const ImageInfo& imageInfo,
|
||||||
@@ -228,9 +228,10 @@ public:
|
|||||||
void RemoveListener(Listener* listener);
|
void RemoveListener(Listener* listener);
|
||||||
|
|
||||||
// service methods for Thread
|
// service methods for Thread
|
||||||
void NotifyThreadStateChanged(Thread* thread);
|
void NotifyThreadStateChanged(::Thread* thread);
|
||||||
void NotifyThreadCpuStateChanged(Thread* thread);
|
void NotifyThreadCpuStateChanged(::Thread* thread);
|
||||||
void NotifyThreadStackTraceChanged(Thread* thread);
|
void NotifyThreadStackTraceChanged(
|
||||||
|
::Thread* thread);
|
||||||
|
|
||||||
// service methods for Image
|
// service methods for Image
|
||||||
void NotifyImageDebugInfoChanged(Image* image);
|
void NotifyImageDebugInfoChanged(Image* image);
|
||||||
@@ -283,8 +284,8 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void _NotifyTeamRenamed();
|
void _NotifyTeamRenamed();
|
||||||
void _NotifyThreadAdded(Thread* thread);
|
void _NotifyThreadAdded(::Thread* thread);
|
||||||
void _NotifyThreadRemoved(Thread* thread);
|
void _NotifyThreadRemoved(::Thread* thread);
|
||||||
void _NotifyImageAdded(Image* image);
|
void _NotifyImageAdded(Image* image);
|
||||||
void _NotifyImageRemoved(Image* image);
|
void _NotifyImageRemoved(Image* image);
|
||||||
|
|
||||||
@@ -327,12 +328,12 @@ protected:
|
|||||||
|
|
||||||
class Team::ThreadEvent : public Event {
|
class Team::ThreadEvent : public Event {
|
||||||
public:
|
public:
|
||||||
ThreadEvent(uint32 type, Thread* thread);
|
ThreadEvent(uint32 type, ::Thread* thread);
|
||||||
|
|
||||||
Thread* GetThread() const { return fThread; }
|
::Thread* GetThread() const { return fThread; }
|
||||||
|
|
||||||
protected:
|
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.
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||||
* Distributed under the terms of the MIT License.
|
* 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:
|
public:
|
||||||
Thread(Team* team, thread_id threadID);
|
Thread(Team* team, thread_id threadID);
|
||||||
~Thread();
|
~Thread();
|
||||||
@@ -96,7 +97,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef DoublyLinkedList<Thread> ThreadList;
|
typedef DoublyLinkedList< ::Thread> ThreadList;
|
||||||
|
|
||||||
|
|
||||||
#endif // THREAD_H
|
#endif // THREAD_H
|
||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <util/DoublyLinkedList.h>
|
#include <util/DoublyLinkedList.h>
|
||||||
|
|
||||||
#include "TeamDebugger.h"
|
#include "controllers/TeamDebugger.h"
|
||||||
|
|
||||||
|
|
||||||
class DebuggerInterface;
|
class DebuggerInterface;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
* 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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef USER_INTERFACE_H
|
#ifndef USER_INTERFACE_H
|
||||||
@@ -169,7 +169,7 @@ public:
|
|||||||
SourceLanguage* language,
|
SourceLanguage* language,
|
||||||
ExpressionInfo* info,
|
ExpressionInfo* info,
|
||||||
StackFrame* frame = NULL,
|
StackFrame* frame = NULL,
|
||||||
Thread* thread = NULL) = 0;
|
::Thread* thread = NULL) = 0;
|
||||||
|
|
||||||
virtual void DebugReportRequested(entry_ref* path) = 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