2009-06-16 04:25:36 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
2015-06-30 06:26:08 +03:00
|
|
|
* Copyright 2013-2015, Rene Gollent, rene@gollent.com.
|
2009-06-16 04:25:36 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef TEAM_H
|
|
|
|
#define TEAM_H
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
#include <map>
|
2009-07-22 23:20:06 +04:00
|
|
|
|
2009-06-16 04:25:36 +04:00
|
|
|
#include <Locker.h>
|
2013-07-07 08:31:22 +04:00
|
|
|
#include <StringList.h>
|
2009-06-16 04:25:36 +04:00
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
#include <ObjectList.h>
|
|
|
|
|
2009-06-16 04:25:36 +04:00
|
|
|
#include "Image.h"
|
2009-06-18 21:57:37 +04:00
|
|
|
#include "ImageInfo.h"
|
2009-07-22 23:20:06 +04:00
|
|
|
#include "TargetAddressRange.h"
|
2009-06-16 04:25:36 +04:00
|
|
|
#include "Thread.h"
|
2009-06-18 21:57:37 +04:00
|
|
|
#include "ThreadInfo.h"
|
2009-07-24 06:35:30 +04:00
|
|
|
#include "UserBreakpoint.h"
|
2012-11-06 14:45:26 +04:00
|
|
|
#include "Watchpoint.h"
|
2009-06-16 04:25:36 +04:00
|
|
|
|
|
|
|
|
2009-06-18 04:35:12 +04:00
|
|
|
// team event types
|
|
|
|
enum {
|
2015-07-26 19:57:15 +03:00
|
|
|
TEAM_EVENT_TEAM_RENAMED,
|
|
|
|
|
2009-06-18 04:35:12 +04:00
|
|
|
TEAM_EVENT_THREAD_ADDED,
|
|
|
|
TEAM_EVENT_THREAD_REMOVED,
|
|
|
|
TEAM_EVENT_IMAGE_ADDED,
|
2009-06-19 01:45:14 +04:00
|
|
|
TEAM_EVENT_IMAGE_REMOVED,
|
|
|
|
|
|
|
|
TEAM_EVENT_THREAD_STATE_CHANGED,
|
|
|
|
TEAM_EVENT_THREAD_CPU_STATE_CHANGED,
|
2009-06-27 20:49:55 +04:00
|
|
|
TEAM_EVENT_THREAD_STACK_TRACE_CHANGED,
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
TEAM_EVENT_IMAGE_DEBUG_INFO_CHANGED,
|
|
|
|
|
2013-07-07 08:31:22 +04:00
|
|
|
TEAM_EVENT_IMAGE_LOAD_SETTINGS_CHANGED,
|
|
|
|
TEAM_EVENT_IMAGE_LOAD_NAME_ADDED,
|
|
|
|
TEAM_EVENT_IMAGE_LOAD_NAME_REMOVED,
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
TEAM_EVENT_DEFAULT_SIGNAL_DISPOSITION_CHANGED,
|
|
|
|
TEAM_EVENT_CUSTOM_SIGNAL_DISPOSITION_CHANGED,
|
|
|
|
TEAM_EVENT_CUSTOM_SIGNAL_DISPOSITION_REMOVED,
|
|
|
|
|
2013-06-28 03:36:47 +04:00
|
|
|
TEAM_EVENT_CONSOLE_OUTPUT_RECEIVED,
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
TEAM_EVENT_BREAKPOINT_ADDED,
|
|
|
|
TEAM_EVENT_BREAKPOINT_REMOVED,
|
2012-11-06 14:45:26 +04:00
|
|
|
TEAM_EVENT_USER_BREAKPOINT_CHANGED,
|
|
|
|
|
|
|
|
TEAM_EVENT_WATCHPOINT_ADDED,
|
|
|
|
TEAM_EVENT_WATCHPOINT_REMOVED,
|
2012-11-24 09:44:00 +04:00
|
|
|
TEAM_EVENT_WATCHPOINT_CHANGED,
|
|
|
|
|
2015-05-23 23:12:43 +03:00
|
|
|
TEAM_EVENT_DEBUG_REPORT_CHANGED,
|
|
|
|
|
2016-04-27 05:35:54 +03:00
|
|
|
TEAM_EVENT_CORE_FILE_CHANGED,
|
|
|
|
|
2015-05-23 23:12:43 +03:00
|
|
|
TEAM_EVENT_MEMORY_CHANGED
|
2009-06-18 04:35:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
class Architecture;
|
|
|
|
class Breakpoint;
|
2013-07-07 08:31:22 +04:00
|
|
|
class BStringList;
|
2009-07-24 06:35:30 +04:00
|
|
|
class Function;
|
2009-07-22 23:20:06 +04:00
|
|
|
class FunctionID;
|
2009-07-08 00:47:39 +04:00
|
|
|
class FunctionInstance;
|
2009-07-02 02:09:33 +04:00
|
|
|
class LocatableFile;
|
* Finished the transformation of the SourceCode interface:
- Replaced StatementAtLine() by GetStatementLocationRange(), which doesn't
return a statement (i.e. also target addresses), but just a range in the
source code. This can also be implemented by FileSourceCode, which can
therefore be used for more than one instance of a function.
- Added GetStatementAtLocation() which kind of is also a replacement for
StatementAtLine(), but is optional and only provided by
DisassembledSourceCode.
- Added GetSourceFile(), which has to be provided when
GetStatementAtLocation() is not implemented.
- Kicked the statement stuff out of FileSourceCode. It only knows source
ranges, now.
* Team: Added GetStatementAtSourceLocation(), which is the real replacement for
SourceCode::StatementAtLine() in cases where a statement is actually
needed. It uses SourceCode::GetStatementAtLocation(), if available and
otherwise finds a function at the source location, and gets a statement for
one of its instances.
* TeamDebugInfo: Does now manage a source file -> functions map allowing to
look up functions at source file locations.
* DwarfImageDebugInfo:
- Switched the path in the source code hash table key for a LocatableFile,
which is cheaper to hash and to compare.
- Fixed bugs where the relocation delta was ignored.
- Replace a -1 in the SourceLocation column component by 0 to avoid
mismatches.
* SourceLocation: Changed component types from uint32 to int32. Otherwise -1 is
not representable.
Things mostly work as before starting the refactoring to support function
instances. All is not well yet, though. E.g. we don't merge the source code
information for common source files (like headers) provided by different
compilation units (or even images) yet. We need to do that, since the debug
info for a compilation unit only contains line number information for inline
functions (in headers) that are actually used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 04:08:45 +04:00
|
|
|
class SourceCode;
|
|
|
|
class SourceLocation;
|
2009-07-08 00:47:39 +04:00
|
|
|
class Statement;
|
2009-06-28 01:09:21 +04:00
|
|
|
class TeamDebugInfo;
|
2009-07-22 23:20:06 +04:00
|
|
|
class TeamMemory;
|
2011-07-01 06:36:32 +04:00
|
|
|
class TeamTypeInformation;
|
2009-10-14 09:03:00 +04:00
|
|
|
class UserBreakpoint;
|
2014-10-28 22:24:34 +03:00
|
|
|
class Value;
|
2009-06-28 01:09:21 +04:00
|
|
|
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
typedef std::map<int32, int32> SignalDispositionMappings;
|
|
|
|
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
class Team {
|
2009-06-17 01:47:49 +04:00
|
|
|
public:
|
2009-06-18 04:35:12 +04:00
|
|
|
class Event;
|
2009-07-22 23:20:06 +04:00
|
|
|
class BreakpointEvent;
|
2013-06-28 03:36:47 +04:00
|
|
|
class ConsoleOutputEvent;
|
2012-11-24 09:44:00 +04:00
|
|
|
class DebugReportEvent;
|
2015-05-23 23:12:43 +03:00
|
|
|
class MemoryChangedEvent;
|
2012-11-06 14:45:26 +04:00
|
|
|
class ImageEvent;
|
2013-07-07 08:31:22 +04:00
|
|
|
class ImageLoadEvent;
|
|
|
|
class ImageLoadNameEvent;
|
2015-06-30 06:26:08 +03:00
|
|
|
class DefaultSignalDispositionEvent;
|
|
|
|
class CustomSignalDispositionEvent;
|
2012-11-06 14:45:26 +04:00
|
|
|
class ThreadEvent;
|
2009-10-14 09:03:00 +04:00
|
|
|
class UserBreakpointEvent;
|
2012-11-06 14:45:26 +04:00
|
|
|
class WatchpointEvent;
|
2016-04-27 05:35:54 +03:00
|
|
|
class CoreFileChangedEvent;
|
2009-06-17 01:47:49 +04:00
|
|
|
class Listener;
|
|
|
|
|
2009-06-16 04:25:36 +04:00
|
|
|
public:
|
2009-07-22 23:20:06 +04:00
|
|
|
Team(team_id teamID, TeamMemory* teamMemory,
|
|
|
|
Architecture* architecture,
|
2011-07-01 06:36:32 +04:00
|
|
|
TeamDebugInfo* debugInfo,
|
|
|
|
TeamTypeInformation* typeInformation);
|
2009-06-16 04:25:36 +04:00
|
|
|
~Team();
|
|
|
|
|
|
|
|
status_t Init();
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
bool Lock() { return fLock.Lock(); }
|
|
|
|
void Unlock() { fLock.Unlock(); }
|
|
|
|
|
2009-06-28 01:09:21 +04:00
|
|
|
team_id ID() const { return fID; }
|
2009-07-22 23:20:06 +04:00
|
|
|
TeamMemory* GetTeamMemory() const
|
|
|
|
{ return fTeamMemory; }
|
|
|
|
Architecture* GetArchitecture() const
|
|
|
|
{ return fArchitecture; }
|
2009-06-28 01:09:21 +04:00
|
|
|
TeamDebugInfo* DebugInfo() const { return fDebugInfo; }
|
2011-07-01 06:36:32 +04:00
|
|
|
TeamTypeInformation*
|
|
|
|
GetTeamTypeInformation() const
|
|
|
|
{ return fTypeInformation; }
|
2009-06-16 04:25:36 +04:00
|
|
|
|
|
|
|
const char* Name() const { return fName.String(); }
|
|
|
|
void SetName(const BString& name);
|
|
|
|
|
|
|
|
void AddThread(Thread* thread);
|
2009-06-18 21:57:37 +04:00
|
|
|
status_t AddThread(const ThreadInfo& threadInfo,
|
2009-06-17 17:35:27 +04:00
|
|
|
Thread** _thread = NULL);
|
2009-06-16 04:25:36 +04:00
|
|
|
void RemoveThread(Thread* thread);
|
|
|
|
bool RemoveThread(thread_id threadID);
|
|
|
|
Thread* ThreadByID(thread_id threadID) const;
|
2009-06-17 01:47:49 +04:00
|
|
|
const ThreadList& Threads() const;
|
2009-06-16 04:25:36 +04:00
|
|
|
|
2009-06-18 21:57:37 +04:00
|
|
|
status_t AddImage(const ImageInfo& imageInfo,
|
2009-07-02 02:09:33 +04:00
|
|
|
LocatableFile* imageFile,
|
2009-06-16 04:25:36 +04:00
|
|
|
Image** _image = NULL);
|
|
|
|
void RemoveImage(Image* image);
|
|
|
|
bool RemoveImage(image_id imageID);
|
|
|
|
Image* ImageByID(image_id imageID) const;
|
2009-06-20 21:20:49 +04:00
|
|
|
Image* ImageByAddress(target_addr_t address) const;
|
2009-06-17 01:47:49 +04:00
|
|
|
const ImageList& Images() const;
|
2015-07-26 00:16:27 +03:00
|
|
|
void ClearImages();
|
2009-06-17 01:47:49 +04:00
|
|
|
|
2013-07-07 08:31:22 +04:00
|
|
|
bool AddStopImageName(const BString& name);
|
|
|
|
void RemoveStopImageName(const BString& name);
|
|
|
|
const BStringList& StopImageNames() const;
|
|
|
|
|
|
|
|
void SetStopOnImageLoad(bool enabled,
|
|
|
|
bool useImageNameList);
|
|
|
|
bool StopOnImageLoad() const
|
|
|
|
{ return fStopOnImageLoad; }
|
|
|
|
bool StopImageNameListEnabled() const
|
|
|
|
{ return fStopImageNameListEnabled; }
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
void SetDefaultSignalDisposition(int32 disposition);
|
|
|
|
int32 DefaultSignalDisposition() const
|
|
|
|
{ return fDefaultSignalDisposition; }
|
|
|
|
bool SetCustomSignalDisposition(int32 signal,
|
|
|
|
int32 disposition);
|
|
|
|
void RemoveCustomSignalDisposition(int32 signal);
|
|
|
|
int32 SignalDispositionFor(int32 signal) const;
|
|
|
|
// if no custom disposition is found,
|
|
|
|
// returns default
|
|
|
|
const SignalDispositionMappings&
|
|
|
|
GetSignalDispositionMappings() const;
|
|
|
|
|
2015-07-26 00:16:27 +03:00
|
|
|
void ClearSignalDispositionMappings();
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
bool AddBreakpoint(Breakpoint* breakpoint);
|
|
|
|
// takes over reference (also on error)
|
|
|
|
void RemoveBreakpoint(Breakpoint* breakpoint);
|
|
|
|
// releases its own reference
|
|
|
|
int32 CountBreakpoints() const;
|
|
|
|
Breakpoint* BreakpointAt(int32 index) const;
|
|
|
|
Breakpoint* BreakpointAtAddress(
|
|
|
|
target_addr_t address) const;
|
|
|
|
void GetBreakpointsInAddressRange(
|
|
|
|
TargetAddressRange range,
|
|
|
|
BObjectList<UserBreakpoint>& breakpoints)
|
|
|
|
const;
|
|
|
|
void GetBreakpointsForSourceCode(
|
|
|
|
SourceCode* sourceCode,
|
|
|
|
BObjectList<UserBreakpoint>& breakpoints)
|
|
|
|
const;
|
|
|
|
|
2009-07-24 06:35:30 +04:00
|
|
|
void AddUserBreakpoint(
|
|
|
|
UserBreakpoint* userBreakpoint);
|
|
|
|
void RemoveUserBreakpoint(
|
|
|
|
UserBreakpoint* userBreakpoint);
|
|
|
|
const UserBreakpointList& UserBreakpoints() const
|
|
|
|
{ return fUserBreakpoints; }
|
|
|
|
|
2012-11-06 14:45:26 +04:00
|
|
|
bool AddWatchpoint(Watchpoint* watchpoint);
|
|
|
|
// takes over reference (also on error)
|
|
|
|
void RemoveWatchpoint(Watchpoint* watchpoint);
|
|
|
|
// releases its own reference
|
|
|
|
int32 CountWatchpoints() const;
|
|
|
|
Watchpoint* WatchpointAt(int32 index) const;
|
|
|
|
Watchpoint* WatchpointAtAddress(
|
|
|
|
target_addr_t address) const;
|
|
|
|
void GetWatchpointsInAddressRange(
|
|
|
|
TargetAddressRange range,
|
|
|
|
BObjectList<Watchpoint>& watchpoints)
|
|
|
|
const;
|
2012-11-07 17:50:17 +04:00
|
|
|
const WatchpointList& Watchpoints() const
|
|
|
|
{ return fWatchpoints; }
|
2012-11-06 14:45:26 +04:00
|
|
|
|
2009-07-08 00:47:39 +04:00
|
|
|
status_t GetStatementAtAddress(target_addr_t address,
|
|
|
|
FunctionInstance*& _function,
|
|
|
|
Statement*& _statement);
|
|
|
|
// returns a reference to the statement,
|
|
|
|
// not to the functions instance, though,
|
|
|
|
// caller must lock
|
* Finished the transformation of the SourceCode interface:
- Replaced StatementAtLine() by GetStatementLocationRange(), which doesn't
return a statement (i.e. also target addresses), but just a range in the
source code. This can also be implemented by FileSourceCode, which can
therefore be used for more than one instance of a function.
- Added GetStatementAtLocation() which kind of is also a replacement for
StatementAtLine(), but is optional and only provided by
DisassembledSourceCode.
- Added GetSourceFile(), which has to be provided when
GetStatementAtLocation() is not implemented.
- Kicked the statement stuff out of FileSourceCode. It only knows source
ranges, now.
* Team: Added GetStatementAtSourceLocation(), which is the real replacement for
SourceCode::StatementAtLine() in cases where a statement is actually
needed. It uses SourceCode::GetStatementAtLocation(), if available and
otherwise finds a function at the source location, and gets a statement for
one of its instances.
* TeamDebugInfo: Does now manage a source file -> functions map allowing to
look up functions at source file locations.
* DwarfImageDebugInfo:
- Switched the path in the source code hash table key for a LocatableFile,
which is cheaper to hash and to compare.
- Fixed bugs where the relocation delta was ignored.
- Replace a -1 in the SourceLocation column component by 0 to avoid
mismatches.
* SourceLocation: Changed component types from uint32 to int32. Otherwise -1 is
not representable.
Things mostly work as before starting the refactoring to support function
instances. All is not well yet, though. E.g. we don't merge the source code
information for common source files (like headers) provided by different
compilation units (or even images) yet. We need to do that, since the debug
info for a compilation unit only contains line number information for inline
functions (in headers) that are actually used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 04:08:45 +04:00
|
|
|
status_t GetStatementAtSourceLocation(
|
|
|
|
SourceCode* sourceCode,
|
|
|
|
const SourceLocation& location,
|
|
|
|
Statement*& _statement);
|
|
|
|
// returns a reference to the statement
|
|
|
|
// (any matching statement!),
|
|
|
|
// caller must lock,
|
2009-07-08 00:47:39 +04:00
|
|
|
|
2009-07-24 06:35:30 +04:00
|
|
|
Function* FunctionByID(FunctionID* functionID) const;
|
|
|
|
|
2009-06-17 01:47:49 +04:00
|
|
|
void AddListener(Listener* listener);
|
|
|
|
void RemoveListener(Listener* listener);
|
|
|
|
|
2009-06-19 01:45:14 +04:00
|
|
|
// service methods for Thread
|
|
|
|
void NotifyThreadStateChanged(Thread* thread);
|
|
|
|
void NotifyThreadCpuStateChanged(Thread* thread);
|
|
|
|
void NotifyThreadStackTraceChanged(Thread* thread);
|
|
|
|
|
2009-06-27 20:49:55 +04:00
|
|
|
// service methods for Image
|
|
|
|
void NotifyImageDebugInfoChanged(Image* image);
|
|
|
|
|
2013-07-07 08:31:22 +04:00
|
|
|
// service methods for Image load settings
|
|
|
|
void NotifyStopOnImageLoadChanged(bool enabled,
|
|
|
|
bool useImageNameList);
|
|
|
|
void NotifyStopImageNameAdded(const BString& name);
|
|
|
|
void NotifyStopImageNameRemoved(
|
|
|
|
const BString& name);
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
// service methods for Signal Disposition settings
|
|
|
|
void NotifyDefaultSignalDispositionChanged(
|
|
|
|
int32 newDisposition);
|
|
|
|
void NotifyCustomSignalDispositionChanged(
|
|
|
|
int32 signal, int32 disposition);
|
|
|
|
void NotifyCustomSignalDispositionRemoved(
|
|
|
|
int32 signal);
|
|
|
|
|
2013-06-28 03:36:47 +04:00
|
|
|
// service methods for console output
|
|
|
|
void NotifyConsoleOutputReceived(
|
|
|
|
int32 fd, const BString& output);
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
// breakpoint related service methods
|
|
|
|
void NotifyUserBreakpointChanged(
|
2009-10-14 09:03:00 +04:00
|
|
|
UserBreakpoint* breakpoint);
|
2009-07-22 23:20:06 +04:00
|
|
|
|
2012-11-06 14:45:26 +04:00
|
|
|
// watchpoint related service methods
|
|
|
|
void NotifyWatchpointChanged(
|
|
|
|
Watchpoint* watchpoint);
|
|
|
|
|
2012-11-24 09:44:00 +04:00
|
|
|
// debug report related service methods
|
|
|
|
void NotifyDebugReportChanged(
|
|
|
|
const char* reportPath);
|
|
|
|
|
2016-04-27 05:35:54 +03:00
|
|
|
// core file related service methods
|
|
|
|
void NotifyCoreFileChanged(
|
|
|
|
const char* targetPath);
|
|
|
|
|
2015-05-23 23:12:43 +03:00
|
|
|
// memory write related service methods
|
|
|
|
void NotifyMemoryChanged(target_addr_t address,
|
|
|
|
target_size_t size);
|
|
|
|
|
2009-06-17 01:47:49 +04:00
|
|
|
private:
|
2009-07-22 23:20:06 +04:00
|
|
|
struct BreakpointByAddressPredicate;
|
2012-11-06 14:45:26 +04:00
|
|
|
struct WatchpointByAddressPredicate;
|
2009-07-22 23:20:06 +04:00
|
|
|
|
|
|
|
typedef BObjectList<Breakpoint> BreakpointList;
|
2009-06-17 01:47:49 +04:00
|
|
|
typedef DoublyLinkedList<Listener> ListenerList;
|
|
|
|
|
|
|
|
private:
|
2015-07-26 19:57:15 +03:00
|
|
|
void _NotifyTeamRenamed();
|
2009-06-17 01:47:49 +04:00
|
|
|
void _NotifyThreadAdded(Thread* thread);
|
|
|
|
void _NotifyThreadRemoved(Thread* thread);
|
|
|
|
void _NotifyImageAdded(Image* image);
|
|
|
|
void _NotifyImageRemoved(Image* image);
|
2009-06-16 04:25:36 +04:00
|
|
|
|
|
|
|
private:
|
2009-07-22 23:20:06 +04:00
|
|
|
BLocker fLock;
|
2009-06-16 04:25:36 +04:00
|
|
|
team_id fID;
|
2009-07-22 23:20:06 +04:00
|
|
|
TeamMemory* fTeamMemory;
|
2011-07-01 06:36:32 +04:00
|
|
|
TeamTypeInformation*
|
|
|
|
fTypeInformation;
|
2009-07-22 23:20:06 +04:00
|
|
|
Architecture* fArchitecture;
|
2009-06-28 01:09:21 +04:00
|
|
|
TeamDebugInfo* fDebugInfo;
|
2009-06-16 04:25:36 +04:00
|
|
|
BString fName;
|
|
|
|
ThreadList fThreads;
|
|
|
|
ImageList fImages;
|
2013-07-07 08:31:22 +04:00
|
|
|
bool fStopOnImageLoad;
|
|
|
|
bool fStopImageNameListEnabled;
|
|
|
|
BStringList fStopImageNames;
|
2015-06-30 06:26:08 +03:00
|
|
|
int32 fDefaultSignalDisposition;
|
|
|
|
SignalDispositionMappings
|
|
|
|
fCustomSignalDispositions;
|
2009-07-22 23:20:06 +04:00
|
|
|
BreakpointList fBreakpoints;
|
2012-11-06 14:45:26 +04:00
|
|
|
WatchpointList fWatchpoints;
|
2009-07-24 06:35:30 +04:00
|
|
|
UserBreakpointList fUserBreakpoints;
|
2009-06-17 01:47:49 +04:00
|
|
|
ListenerList fListeners;
|
2009-06-16 04:25:36 +04:00
|
|
|
};
|
|
|
|
|
2009-06-17 01:47:49 +04:00
|
|
|
|
2009-06-18 04:35:12 +04:00
|
|
|
class Team::Event {
|
|
|
|
public:
|
|
|
|
Event(uint32 type, Team* team);
|
|
|
|
|
|
|
|
uint32 EventType() const { return fEventType; }
|
|
|
|
Team* GetTeam() const { return fTeam; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
uint32 fEventType;
|
|
|
|
Team* fTeam;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Team::ThreadEvent : public Event {
|
|
|
|
public:
|
|
|
|
ThreadEvent(uint32 type, Thread* thread);
|
|
|
|
|
|
|
|
Thread* GetThread() const { return fThread; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Thread* fThread;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Team::ImageEvent : public Event {
|
|
|
|
public:
|
|
|
|
ImageEvent(uint32 type, Image* image);
|
|
|
|
|
|
|
|
Image* GetImage() const { return fImage; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Image* fImage;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-07-07 08:31:22 +04:00
|
|
|
class Team::ImageLoadEvent : public Event {
|
|
|
|
public:
|
|
|
|
ImageLoadEvent(uint32 type, Team* team,
|
|
|
|
bool stopOnImageLoad,
|
|
|
|
bool stopImageNameListEnabled);
|
|
|
|
|
|
|
|
bool StopOnImageLoad() const
|
|
|
|
{ return fStopOnImageLoad; }
|
|
|
|
bool StopImageNameListEnabled() const
|
|
|
|
{ return fStopImageNameListEnabled; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool fStopOnImageLoad;
|
|
|
|
bool fStopImageNameListEnabled;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Team::ImageLoadNameEvent : public Event {
|
|
|
|
public:
|
|
|
|
ImageLoadNameEvent(uint32 type, Team* team,
|
|
|
|
const BString& name);
|
|
|
|
|
|
|
|
const BString& ImageName() const { return fImageName; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
BString fImageName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
class Team::DefaultSignalDispositionEvent : public Event {
|
|
|
|
public:
|
|
|
|
DefaultSignalDispositionEvent(uint32 type,
|
|
|
|
Team* team, int32 disposition);
|
|
|
|
|
|
|
|
int32 DefaultDisposition() const
|
|
|
|
{ return fDefaultDisposition; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32 fDefaultDisposition;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Team::CustomSignalDispositionEvent : public Event {
|
|
|
|
public:
|
|
|
|
CustomSignalDispositionEvent(uint32 type,
|
|
|
|
Team* team, int32 signal,
|
|
|
|
int32 disposition);
|
|
|
|
|
|
|
|
int32 Signal() const { return fSignal; }
|
|
|
|
int32 Disposition() const { return fDisposition; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32 fSignal;
|
|
|
|
int32 fDisposition;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
class Team::BreakpointEvent : public Event {
|
|
|
|
public:
|
|
|
|
BreakpointEvent(uint32 type, Team* team,
|
|
|
|
Breakpoint* breakpoint);
|
|
|
|
|
|
|
|
Breakpoint* GetBreakpoint() const { return fBreakpoint; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Breakpoint* fBreakpoint;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-06-28 03:36:47 +04:00
|
|
|
class Team::ConsoleOutputEvent : public Event {
|
|
|
|
public:
|
|
|
|
ConsoleOutputEvent(uint32 type, Team* team,
|
|
|
|
int32 fd, const BString& output);
|
|
|
|
|
|
|
|
int32 Descriptor() const { return fDescriptor; }
|
|
|
|
const BString& Output() const { return fOutput; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int32 fDescriptor;
|
|
|
|
BString fOutput;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-11-24 09:44:00 +04:00
|
|
|
class Team::DebugReportEvent : public Event {
|
|
|
|
public:
|
|
|
|
DebugReportEvent(uint32 type, Team* team,
|
|
|
|
const char* reportPath);
|
|
|
|
|
|
|
|
const char* GetReportPath() const { return fReportPath; }
|
|
|
|
protected:
|
|
|
|
const char* fReportPath;
|
|
|
|
};
|
|
|
|
|
2016-04-27 05:35:54 +03:00
|
|
|
class Team::CoreFileChangedEvent : public Event {
|
|
|
|
public:
|
|
|
|
CoreFileChangedEvent(uint32 type, Team* team,
|
|
|
|
const char* targetPath);
|
|
|
|
const char* GetTargetPath() const { return fTargetPath; }
|
|
|
|
protected:
|
|
|
|
const char* fTargetPath;
|
|
|
|
};
|
|
|
|
|
2012-11-24 09:44:00 +04:00
|
|
|
|
2015-05-23 23:12:43 +03:00
|
|
|
class Team::MemoryChangedEvent : public Event {
|
|
|
|
public:
|
|
|
|
MemoryChangedEvent(uint32 type, Team* team,
|
|
|
|
target_addr_t address, target_size_t size);
|
|
|
|
|
|
|
|
target_addr_t GetTargetAddress() const
|
|
|
|
{ return fTargetAddress; }
|
|
|
|
|
|
|
|
target_size_t GetSize() const { return fSize; }
|
|
|
|
protected:
|
|
|
|
target_addr_t fTargetAddress;
|
|
|
|
target_size_t fSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-11-06 14:45:26 +04:00
|
|
|
class Team::WatchpointEvent : public Event {
|
|
|
|
public:
|
|
|
|
WatchpointEvent(uint32 type, Team* team,
|
|
|
|
Watchpoint* watchpoint);
|
|
|
|
|
|
|
|
Watchpoint* GetWatchpoint() const { return fWatchpoint; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Watchpoint* fWatchpoint;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-10-14 09:03:00 +04:00
|
|
|
class Team::UserBreakpointEvent : public Event {
|
|
|
|
public:
|
|
|
|
UserBreakpointEvent(uint32 type, Team* team,
|
|
|
|
UserBreakpoint* breakpoint);
|
|
|
|
|
|
|
|
UserBreakpoint* GetBreakpoint() const { return fBreakpoint; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UserBreakpoint* fBreakpoint;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-06-17 01:47:49 +04:00
|
|
|
class Team::Listener : public DoublyLinkedListLinkImpl<Team::Listener> {
|
|
|
|
public:
|
|
|
|
virtual ~Listener();
|
|
|
|
|
2015-07-26 19:57:15 +03:00
|
|
|
virtual void TeamRenamed(
|
|
|
|
const Team::Event& event);
|
|
|
|
|
2009-06-18 04:35:12 +04:00
|
|
|
virtual void ThreadAdded(const Team::ThreadEvent& event);
|
|
|
|
virtual void ThreadRemoved(const Team::ThreadEvent& event);
|
2009-06-17 01:47:49 +04:00
|
|
|
|
2009-06-18 04:35:12 +04:00
|
|
|
virtual void ImageAdded(const Team::ImageEvent& event);
|
|
|
|
virtual void ImageRemoved(const Team::ImageEvent& event);
|
2009-06-19 01:45:14 +04:00
|
|
|
|
|
|
|
virtual void ThreadStateChanged(
|
|
|
|
const Team::ThreadEvent& event);
|
|
|
|
virtual void ThreadCpuStateChanged(
|
|
|
|
const Team::ThreadEvent& event);
|
|
|
|
virtual void ThreadStackTraceChanged(
|
|
|
|
const Team::ThreadEvent& event);
|
2009-06-27 20:49:55 +04:00
|
|
|
|
|
|
|
virtual void ImageDebugInfoChanged(
|
|
|
|
const Team::ImageEvent& event);
|
2009-07-22 23:20:06 +04:00
|
|
|
|
2013-07-07 08:31:22 +04:00
|
|
|
virtual void StopOnImageLoadSettingsChanged(
|
|
|
|
const Team::ImageLoadEvent& event);
|
|
|
|
virtual void StopOnImageLoadNameAdded(
|
|
|
|
const Team::ImageLoadNameEvent& event);
|
|
|
|
virtual void StopOnImageLoadNameRemoved(
|
|
|
|
const Team::ImageLoadNameEvent& event);
|
|
|
|
|
2015-06-30 06:26:08 +03:00
|
|
|
virtual void DefaultSignalDispositionChanged(
|
|
|
|
const Team::DefaultSignalDispositionEvent&
|
|
|
|
event);
|
|
|
|
virtual void CustomSignalDispositionChanged(
|
|
|
|
const Team::CustomSignalDispositionEvent&
|
|
|
|
event);
|
|
|
|
virtual void CustomSignalDispositionRemoved(
|
|
|
|
const Team::CustomSignalDispositionEvent&
|
|
|
|
event);
|
|
|
|
|
2013-06-28 03:36:47 +04:00
|
|
|
virtual void ConsoleOutputReceived(
|
|
|
|
const Team::ConsoleOutputEvent& event);
|
|
|
|
|
2009-07-22 23:20:06 +04:00
|
|
|
virtual void BreakpointAdded(
|
|
|
|
const Team::BreakpointEvent& event);
|
|
|
|
virtual void BreakpointRemoved(
|
|
|
|
const Team::BreakpointEvent& event);
|
|
|
|
virtual void UserBreakpointChanged(
|
2009-10-14 09:03:00 +04:00
|
|
|
const Team::UserBreakpointEvent& event);
|
2012-11-06 14:45:26 +04:00
|
|
|
|
|
|
|
virtual void WatchpointAdded(
|
|
|
|
const Team::WatchpointEvent& event);
|
|
|
|
virtual void WatchpointRemoved(
|
|
|
|
const Team::WatchpointEvent& event);
|
|
|
|
virtual void WatchpointChanged(
|
|
|
|
const Team::WatchpointEvent& event);
|
2012-11-24 09:44:00 +04:00
|
|
|
|
|
|
|
virtual void DebugReportChanged(
|
|
|
|
const Team::DebugReportEvent& event);
|
2015-05-23 23:12:43 +03:00
|
|
|
|
2016-04-27 05:35:54 +03:00
|
|
|
virtual void CoreFileChanged(
|
|
|
|
const Team::CoreFileChangedEvent& event);
|
|
|
|
|
2015-05-23 23:12:43 +03:00
|
|
|
virtual void MemoryChanged(
|
|
|
|
const Team::MemoryChangedEvent& event);
|
2009-06-17 01:47:49 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-06-16 04:25:36 +04:00
|
|
|
#endif // TEAM_H
|