Commit 9c7371af authored by hjk's avatar hjk
Browse files

debugger: enable compiling parts of cdb for testing purposes on non-Windows

parent 97edcb79
......@@ -36,3 +36,44 @@ SOURCES += \
FORMS += $$PWD/cdboptionspagewidget.ui
}
# Compile test on non-Windows platforms
isEmpty(CDB_PATH) {
false {
HEADERS += \
# $$PWD/cdbdebugengine.h \
# $$PWD/cdbdebugengine_p.h \
# $$PWD/cdbdebugeventcallback.h \
# $$PWD/cdbdebugoutput.h \
# $$PWD/cdbsymbolgroupcontext.h \
# $$PWD/cdbsymbolgroupcontext_tpl.h \
# $$PWD/cdbstacktracecontext.h \
# $$PWD/cdbbreakpoint.h \
# $$PWD/cdbmodules.h \
# $$PWD/cdbassembler.h \
# $$PWD/cdboptions.h \
# $$PWD/cdboptionspage.h \
# $$PWD/cdbdumperhelper.h \
# $$PWD/cdbsymbolpathlisteditor.h \
# $$PWD/cdbexceptionutils.h
SOURCES += \
# $$PWD/cdbdebugengine.cpp \
# $$PWD/cdbdebugeventcallback.cpp \
$$PWD/cdbdebugoutput.cpp \
# $$PWD/cdbsymbolgroupcontext.cpp \
# $$PWD/cdbstacktracecontext.cpp \
# $$PWD/cdbbreakpoint.cpp \
# $$PWD/cdbmodules.cpp \
# $$PWD/cdbassembler.cpp \
# $$PWD/cdboptions.cpp \
# $$PWD/cdboptionspage.cpp \
# $$PWD/cdbdumperhelper.cpp \
# $$PWD/cdbsymbolpathlisteditor.cpp \
# $$PWD/cdbexceptionutils.cpp
FORMS += $$PWD/cdboptionspagewidget.ui
}
}
......@@ -30,6 +30,8 @@
#ifndef CDBCOM_H
#define CDBCOM_H
#ifdef Q_OS_WINDOWS
#include <windows.h>
#include <inc/dbgeng.h>
......@@ -44,4 +46,10 @@ typedef IDebugDataSpaces4 CIDebugDataSpaces;
typedef IDebugSymbolGroup2 CIDebugSymbolGroup;
typedef IDebugBreakpoint2 CIDebugBreakpoint;
#else
#include "cdbcomstub.h"
#endif // Q_OS_WINDOWS
#endif // CDBCOM_H
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef CDBCOMSTUB_H
#define CDBCOMSTUB_H
// Stubs to make it partially compile for test purposes on non-Windows.
typedef unsigned long ULONG;
typedef unsigned long long ULONG64;
typedef void *PVOID;
typedef unsigned short *PCWSTR;
typedef void *HANDLE;
typedef int HRESULT;
typedef int DEBUG_VALUE;
typedef int PDEBUG_BREAKPOINT2;
enum
{
DEBUG_OUTPUT_PROMPT_REGISTERS = 1,
DEBUG_OUTPUT_EXTENSION_WARNING = 2,
DEBUG_OUTPUT_WARNING = 4,
DEBUG_OUTPUT_ERROR = 8,
DEBUG_OUTPUT_DEBUGGEE = 16,
DEBUG_OUTPUT_DEBUGGEE_PROMPT = 32,
DEBUG_OUTPUT_PROMPT = 64,
};
#define IN
#define OUT
#define THIS
#define THIS_
#define REFIID void *
#define THIS_
#define STDMETHOD(x) void x
#define STDMETHOD_(x, y) x y
struct IUnknown
{
virtual ~IUnknown();
virtual STDMETHOD_(ULONG, AddRef)(THIS) { return 1; }
virtual STDMETHOD_(ULONG, Release)(THIS) { return 1; }
};
struct IDebugOutputCallbacksWide : IUnknown
{
};
struct CIDebugClient
{
};
struct CIDebugControl
{
};
struct CIDebugSystemObjects
{
};
struct CIDebugSymbols
{
};
struct CIDebugRegisters
{
};
struct CIDebugDataSpaces
{
};
struct CIDebugSymbolGroup
{
};
struct CIDebugBreakpoint
{
};
#endif // Q_OS_WINDOWS
......@@ -30,9 +30,7 @@
#include "cdbdebugoutput.h"
#include "cdbdebugengine.h"
#include "cdbdebugengine_p.h"
#include <windows.h>
#include <inc/dbgeng.h>
#include "cdbcom.h"
namespace Debugger {
namespace Internal {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment