blob: 57356e788daa9cfc97d379e1fbfcf7c6ec4c3c70 [file] [log] [blame]
* Copyright (c) 2009, 2011 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Contributors:
* Nokia - Initial API and implementation
#pragma once
#include <vector>
#include <set>
#include "stdafx.h"
#include "ProcessContext.h"
#include "WinHWBkptMgr.h"
#include "WinDebugMonitor.h"
class WinThread;
class WinDebugMonitor;
class WinProcess : public ProcessContext {
WinProcess(WinDebugMonitor*, DEBUG_EVENT& debugEvent);
WinProcess(DWORD procID, std::string procName);
virtual ~WinProcess(void);
// Overrides of RunControlContext
virtual int ReadMemory(const ReadWriteMemoryParams&) throw (AgentException);
virtual int WriteMemory(const ReadWriteMemoryParams&) throw (AgentException);
virtual void Terminate(const AgentActionParams&) throw (AgentException);
virtual void SingleStep(const AgentActionParams&) throw (AgentException);
// end overrides
const HANDLE& GetProcessHandle() const;
WinDebugMonitor* GetMonitor() const;
static WinProcess* GetProcessByID(int processID);
std::map<int, Properties>& GetExecutablesByAddress();
void SetDebugRegister(WinHWBkptMgr::DRMask, ContextAddress, WinHWBkptMgr::DRFlags);
void ClearDebugRegister(WinHWBkptMgr::DRMask);
void Initialize();
bool isRoot_;
HANDLE processHandle_;
std::string processName_;
WinDebugMonitor* monitor_;
std::map<int, Properties> executablesByAddress_;
static std::map<int, WinProcess*> processIDMap;