/*
Copyright (C) 2006 - 2009 Evan Teran
                   eteran@alum.rit.edu

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef DEBUGGERCOREOSX_20090529_H_
#define DEBUGGERCOREOSX_20090529_H_

#include "DebuggerCoreUNIX.h"

class DebuggerCore : public DebuggerCoreUNIX {
	Q_OBJECT
	Q_INTERFACES(DebuggerCoreInterface)
	Q_CLASSINFO("author", "Evan Teran")
	Q_CLASSINFO("url", "http://www.codef00.com")

public:
	DebuggerCore();
	virtual ~DebuggerCore();
	
public:
	virtual edb::address_t pageSize() const;
	virtual bool waitForDebugEvent(DebugEvent &event, int msecs);
	virtual bool attach(edb::pid_t pid);
	virtual void detach();
	virtual void kill();
	virtual void pause();
	virtual void resume(EVENT_STATUS status);
	virtual void step(EVENT_STATUS status);
	virtual void getState(State &state);
	virtual void setState(const State &state);
	virtual bool open(const QString &path, const QString &cwd, const QStringList &args, const QString &tty);

private:
	virtual long readData(edb::address_t address, bool &ok);
	virtual bool writeData(edb::address_t address, long value);
	
private:
	edb::address_t m_PageSize;
};

#endif
